Mike's suggestion is helpful but it's platform-specific, so you'd have to
handle things differently depending on what platform you've copied the
file to. The right answer would be for the STAF FS service to retain file
permissions during a copy, or to provide some facility to set file
permissions (specified in a platform-independent way, but implemented
under-the-covers in a platform-specific way). There is a feature request
already logged for this; see this excerpt from an email from Sharon Lucas
to me dated 4/29/08:
...
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.
...
I suggest you go to one or both of those feature requests and add your
name as an interested party.
In the meantime the only alternative is to perform 'chmod' manually as an
after-step, as Mike suggested, and be mindful of the platform-specific
nuances (that's what we're doing).
----------------------------------------------------------------------------------------
Joe Veilleux
IBM/Lotus Domino Server Quality Engineering
5 Technology Park Drive
Westford MA 01886
Email: joeveill...@us.ibm.com
"Edmonds, Michael" <michael.edmo...@netapp.com>
02/25/2009 08:51 PM
To
"Srinivas N.CH." <nch.srini...@gmail.com>,
<staf-users@lists.sourceforge.net>
cc
Subject
Re: [staf-users] How to copy files to remote machines with
executepermissions.
$ touch some.sh
$ chmod +x some.sh
$ staf local fs copy file /root/some.sh tofile /root/other.sh
Response
--------
$ ll other.sh
-rw-rw-rw- 1 root root 0 Feb 25 20:45 other.sh
$ ll some.sh
-rwxrwxr-x 1 medmonds engr 0 Feb 25 20:43 some.sh
$ staf local process start command chmod parms "+x /root/other.sh" wait
Response
--------
{
Return Code: 0
Key : <None>
Files : []
}
$ ll other.sh
-rwxrwxrwx 1 root root 0 Feb 25 20:45 other.sh
$
Hope this helps,
Mike
From: Edmonds, Michael
Sent: Wednesday, February 25, 2009 8:41 PM
To: 'Srinivas N.CH.'; staf-users@lists.sourceforge.net
Subject: RE: [staf-users] How to copy files to remote machines with
executepermissions.
doesn't look like you can do that.
http://staf.sourceforge.net/current/STAFUG.htm#HDRFSSRV
"
Notes:
1. A file copied via the FS service does not retain its system or
extended attributes.
2. ...
"
From: Srinivas N.CH. [mailto:nch.srini...@gmail.com]
Sent: Wednesday, February 25, 2009 7:04 PM
To: staf-users@lists.sourceforge.net
Subject: [staf-users] How to copy files to remote machines with
executepermissions.
Hi,
I'm copying some files to a remote machine using STAF service "FS".
However, the files copied to remote machine doesn't have execute
permissions. Anyone tell me How do I copy files through STAF with execute
permssions.
Regards,
Srinivas.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
CA
-OSBC tackles the biggest issue in open source: Open Sourcing the
Enterprise
-Strategies to boost innovation and cut costs with open source
participation
-Receive a $600 discount off the registration fee with the source code:
SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users