You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2021/10/09 20:14:23 UTC
[GitHub] [mina-sshd] tomaswolf opened a new pull request #203: [SSHD-1215] Treat ACE4_APPEND_DATA as a hint only
tomaswolf opened a new pull request #203:
URL: https://github.com/apache/mina-sshd/pull/203
Some SFTP clients in SFTP version >= V5 set the NFS desired-access flag
ACE4_APPEND_DATA even when they only open the file for normal write
access. SFTP append mode should be active only if the file is indeed
opened with one of the "append" options SSH_FXF_APPEND or
SSH_FXF_APPEND_DATA or SSH_FXF_APPEND_DATA_ATOMIC.
The SFTP draft RFCs appear to allow the combination of SSH_FXF_READ,
SSH_FXF_WRITE, and SSH_FXF_APPEND, which would open the file for reading
and writing, all writes going to the current end of the file. POSIX
also allows the combination O_RDWR | O_APPEND. But Java complains about
using both StandardOpenOption.READ and StandardOpenOption.APPEND.
Therefore never open files in Java with StandardOpenOption.APPEND but
always manage the "append" logic explicitly. Internally, make sure that
ACE4_APPEND_DATA is set only if the user/client had indeed requested
"append" mode.
--
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