IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SFTP: changing the owner of a file / directory without changing the group



Hi,

Thus wrote Terra Frost (terrafrost%gmail.com@localhost):

> 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
-- 
spz%serpens.de@localhost (S.P.Zeidler)



Home | Main Index | Thread Index | Old Index