Re: SFTP: changing the owner of a file / directory without changing the group
"S.P.Zeidler" <[email protected]>
| Newsgroups | gmane.ietf.secsh |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thus wrote Terra Frost ([email protected]): > In SFTPv4+ there's an SSH_FILEXFER_ATTR_OWNERGROUP attribute flag that > takes in strings. In SFTPv3 and earlier there's a > SSH_FILEXFER_ATTR_UIDGID attribute flag that pretty much does the same > thing but takes in integers. > > My question is... why are the owner and group being set at the same > time? On Linux it's not chowngrp - it's chown and chgrp as separate > commands. Why aren't they separate values in SFTP? Even Linux' chown(2) handles setting owner and group in the same call. See http://www.kernel.org/doc/man-pages/online/pages/man2/chown.2.html It also says: If the owner or group is specified as -1, then that ID is not changed. This is POSIX behaviour. regards, spz -- [email protected] (S.P.Zeidler)