SFTP: changing the owner of a file / directory without changing the group
Terra Frost <[email protected]>
| Newsgroups | gmane.ietf.secsh |
|---|---|
| Message-ID | <CAKY7Jh74_TF2kNX+5KOzoyTFW+4daLxsd5rFbFXGE5NN3s780Q@mail.gmail.com> |
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? I guess if all one wanted to do was set the owner one could do SSH_FXP_STAT to get the the group and then update the owner to the new owner and update the group to be the same group that it was before but that seems like it ought not be necessary - that if SFTP were still being developed as a protocol that that's an area that could benefit from improvement?