|
: Is there a way to do so that files created in a directory (or
: subdirectory) get the Owner UIC of the process creating it and not the
: Owner either from the parent directory or subdirectory or from an already
: exsting file having the same name and same extension ?
Sure. Turn off the privileges. :-)
Every file created gets the owner UIC of the file's creator, unless
the owner has SYSPRV or similar heavy privilege enabled, when the
file(s) will get the owner of the parent directory or the previous
version. (There's a flow-chart in the documentation showing the
whole ownership process...) Use an ACL to allow non-privileged
access to the directory...
If you want to make the files accessable by other users, please
take a look at the documentation set -- there are several different
situations where this might be of interest including a basic ACL,
or situations sporting a "resource identifier" for shared scratch
space...
|
|
> Is there a way to do so that files created in a directory (or
> subdirectory) get the Owner UIC of the process creating it and not the
> Owner either from the parent directory or subdirectory or from an already
> exsting file having the same name and same extension ?
Sure, by explicitly specifying the owner UIC either on the
command line (CREATE/OWNER, COPY/OWNER,...) or inside
the FDL used (CREATE/FDL, CONVERT/FDL,...) or within
a program by providing an XABPRO.
Ooops, COPY/OWNER seems such a 'natural' command, but it is not there!
Bummer. It should have been there :-). I can only think of clumsy
workaround for that from DCL. Ugly stuff like creating a dummy version
first with the right UIC, copying the proper version, and deleting
the dummy. Yuck. Untested:
$! p2 = Target name, p1 = Source
$crea/own='f$getjpi("","UIC")' 'p2'
$tmp_name = f$search(p2)
$out_name = f$elem(0,";",tmp_name) ! Strip version
$copy/new 'p1' 'out_name'
$new_name = f$search(out_name)
$dele 'tmp_name ! Remove dummy
$rena 'out_name 'tmp_name ! All done ?!
It would be much simpler to just copy the file getting the wrong
owner and following the copy by explicitly setting the ownership:
Untested:
$! p2 = Target name, p1 = Source
$out_name = f$parse(p2, p1,,, "SYNTAX_ONLY") ! Apply defaults
$copy 'p1' 'p2'
$set file/own='f$getjpi("","UIC")' 'out_name'
hth,
Hein.
|
| re .2,.0
Instead of the non-existent COPY/OWNER one can use BACKUP.
In many cases it is highly desirable that the newly created file
inherits ownership - that's why the feature was added - so if the
replies here don't address your question, you had better elaborate on
what you are trying to do.
|