PeterAlfredLee edited a comment on pull request #88:
URL: https://github.com/apache/commons-vfs/pull/88#issuecomment-631442687


   > Only non-root users can perform certain tests?
   
   Nope. But these asserts would fail if you are running the tests using root.
   
   I'm running these tests on Ubuntu 18.04. The tests are failing if I'm 
running with root, and they are passed with any non-root user. And the tests 
are passed on Windows.
   I checked the file after calling `file.setWritable(false)`, and it shows the 
file is not writable(-r--r--r--) when I run `ls -l`. At the same time I'm 
getting true when calling `file.canWrite()`. Seems the root user can bypass the 
permission and can write to files that are readonly for root.
   
   See also : [File.canWrite and Files.isWritable not giving correct value on 
Linux](https://stackoverflow.com/questions/28366433/file-canwrite-and-files-iswritable-not-giving-correct-value-on-linux)


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to