You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "rde2 (via GitHub)" <gi...@apache.org> on 2024/07/22 15:56:17 UTC
[I] sftp subsystem ignores process umask when creating directory [mina-sshd]
rde2 opened a new issue, #535:
URL: https://github.com/apache/mina-sshd/issues/535
### Version
2.12.0
### Bug description
Connect to mina sshd sftp server using normal sftp client. Use "mkdir" to create a directory. The directory is created with mode 777 (rwxrwxrwx). The process umask (0022 or 0027) should prevent "write by others" being set.
The directory is created with the correct mode then this is overridden in doMakeDirectory
### Actual behavior
The directory is created with mode 777 (rwxrwxrwx).
### Expected behavior
he directory is created without write by others permission.
### Relevant log output
_No response_
### Other information
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [I] sftp subsystem ignores process umask when creating directory [mina-sshd]
Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf commented on issue #535:
URL: https://github.com/apache/mina-sshd/issues/535#issuecomment-2251428993
The draft RFCs for SFTP versions 3, 4, and 5 are silent on this matter. For SFTP version 6, the draft RFC says
> 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. [draft-ietf-secsh-filexfer-07](https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-07#section-6.6)
OpenSSH does let the system apply the umask, and its SFTP server can even be run with a custom umask that overrides the system umask. OpenSSH implements SFTP version 3.
Maybe the Apache MINA SFTP server part should have a setting for this for SFTP version < 6.
(Seems more of a feature request than a bug.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org