[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20030416: File Permissions when using FILE with LDM
- Subject: 20030416: File Permissions when using FILE with LDM
- Date: Wed, 16 Apr 2003 08:14:42 -0600
>From: "HOETH, BRIAN R. (JSC-ZS) (LM)" <address@hidden>
>Organization: JSC
>Keywords: 200304161304.h3GD417U009662 LDM FILE file permissions
Brianl,
>I was wondering if there is any way to specify the file permissions when
>using FILE in pqact.conf for LDM? I have researched the documentation and
>haven't found anything?
The permissions on the file created will match the umask that is in
scope when the LDM was started.
>The problem is that LDM is filing data as 644 (i.e.
>readwrite-read-read) and I am needing a user other than LDM to access these
>data and write to it. I have gotten around the problem by invoking a script
>in LDM's cron to change permissions on the files, but I'd rather not have to
>do this if it isn't necessary.
Another option is to write a script that will receive the product through
a PIPE action and set the umask in the script. The script would look
something like:
ldmpipewrite (must be executable!)::
#!/bin/sh
umask 666
cat > fully_qualified_filename
You could even specify the file name to write the data into as an
argument to the file:
ldmpipewrite fully_qualified_filename
#!/bin/sh
umask 666
cat > $1
The problem with this approach is that the directory in which the
output file is to be written must exist, otherwise the write will
fail. The FILE action of the LDM, on the other hand, creates the
directory path as needed as long as it has write permission in all of
the directories contained in the path portion of the file name.
You could write some code for your script that would tear apart the fully
qualified name of the file you want to write and create the directories
in the hierarchy as needed. This should be easy in more functional
scripting languages like Tcl/Tk and Perl.
Tom