The STAF FS service does not currently provide the ability to set/change
permissions. There are open features for this that has not been
implemented yet:
- #627835 "Add retain timestamp/permissions on copy"
(http://sourceforge.net/tracker/index.php?func=detail&aid=627835&group_id=33142&atid=407384)
- #797363 "Permissions, get and chmod"
(http://sourceforge.net/tracker/index.php?func=detail&aid=797363&group_id=33142&atid=407384)
As you noted, for now you can use the STAF PROCESS service to run the
appropriate chown/chmod commands after copying files via the FS service to
a Unix machine. If you'd like this capability, please add a comment to
these features as this can help increase its priority.
The STAF FS service does not currently provide a rename function. There
is an open feature, #968429 "FS to support Rename of Files/Directories",
for this that has not been implemented yet. The workarounds are as you
noted -- either use the FS service's COPY and DELETE requests as a
workaround for the rename, or use the STAF PROCESS service and use a
rename command provided by the operating system. If you'd like this
feature, please add a comment to Feature #968429 at
http://sourceforge.net/tracker/index.php?func=detail&aid=968429&group_id=33142&atid=407384
as this can help increase its priority.
We welcome code contributions to STAF. :-) See our contribution process
at http://staf.sourceforge.net/contributions.php for more information if
you interested in developing these features.
Note you can browse open features for the FS service by specifying
Category "Service::FS" via the STAF SourceForge website.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, [EMAIL PROTECTED]
(512) 838-8347 or Tieline 678-8347
Joseph J Veilleux/Lexington/[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
04/29/2008 01:43 PM
To
[email protected]
cc
Joseph J Veilleux/Lexington/[EMAIL PROTECTED]
Subject
[staf-users] Is there a way to copy a file on UNIX and retain (or set)
ownership/permissions?
Long-time listener, first-time caller....
A colleague of mine is considering using the STAF FS service to copy a
file onto a test server, and we know that we can use the STAF FS COPY
command to do that -- we're doing that, and it's fine. Here's the wrinkle:
we need the file to show up on the target server with specific
ownership/permissions. When we use the STAF FS COPY command to copy the
file, the file ends up owned by the OS userid that the STAF process is
running as, with default file permissions.
Is there a way to set file ownership/permissions? Or to copy a file and
retain ownership/permissions?
We've looked and can't seem to find any obvious way to do this...
We did come up with a couple of workarounds but they're all pretty
clumsy... for example we could do a STAF FS COPY, then a STAF PROCESS
START to run the chown and chmod commands we'd need... but we were
thinking there must be something more elegant than that...
Another issue we're facing is the requirement to rename a file. For
reasons that are internal to our product, 'copy' isn't good enough; we
actually need to be able to take a file in-place and just change its name.
We were hoping/expecting to find an FS service subcommand but we didn't
find one. Obviously we could do a STAF PROCESS START and use the OS's
native commands to do the rename, but we were trying to use STAF services
where possible so as to insulate ourselves from all those quirky
OS-specific differences.
Any ideas, on either of these questions?
----------------------------------------------------------------------------------------
Joe Veilleux
IBM/Lotus Domino Server Quality Engineering
5 Technology Park Drive
Westford MA 01886
Email: [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users