hannibal218bc opened a new pull request, #372:
URL: https://github.com/apache/mina-sshd/pull/372

   According to [upstream 
javadoc](https://docs.oracle.com/javase/8/docs/api/java/nio/channels/FileChannel.html#open-java.nio.file.Path-java.util.Set-java.nio.file.attribute.FileAttribute...-),
 the default mode is READ (only) when there is no mode specified:
   
   > The 
[READ](https://docs.oracle.com/javase/8/docs/api/java/nio/file/StandardOpenOption.html#READ)
 and 
[WRITE](https://docs.oracle.com/javase/8/docs/api/java/nio/file/StandardOpenOption.html#WRITE)
 options determine if the file should be opened for reading and/or writing. If 
neither option (or the 
[APPEND](https://docs.oracle.com/javase/8/docs/api/java/nio/file/StandardOpenOption.html#APPEND)
 option) is contained in the array then the file is opened for reading
   
   SftpFileSystemProvider used `READ, WRITE` which leads to `Permission denied` 
errors when trying to access read-only files (see [this Stackoverflow 
thread](https://stackoverflow.com/questions/49235417/sshd-get-content-of-readonly-file)).
   
   This MR suggests to use a standard-complaint setting; however, this might 
cause regressions...


-- 
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-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to