chmod sftp command and setgid/setuid bit

Peter Stuge stuge-openssh-unix-dev at cdy.org
Wed Apr 25 09:28:29 EST 2007


On Wed, Apr 25, 2007 at 12:30:21AM +0200, Eric Noulard wrote:
> As far as I understand sftp-server.c code is seems that
> 
> chmod(name, a->perm & 0777);
> 
> is responsible for this behavior.
> 
> Could you tell me if not handling setuid/setgid bits on sftp-server
> is done on purpose?
> Is it a feature or should it be considered a bug?

Seems like a bug..

--8<-- draft-ietf-secsh-filexfer-12.txt 7.6. Permissions
The server SHOULD NOT apply a 'umask' to the mode bits; but should
set the mode bits as specified by the client.  The client MUST apply
an appropriate 'umask' to the mode bits before sending them.
-->8--


//Peter


More information about the openssh-unix-dev mailing list