I try to read a file from an NFS share that has been created by another user. The file's group permission though is set to a group which the executing user in a member of.
Nevertheless I get a FileAccessExcpetion: Operation not permitted
.
The access right of the file are:
-rw-rw---- 1 nobody data 544648 27. Dez 10:54 sample.pdf
The executing user is in group data
:
id myuser
uid=35103(myuser) gid=35103(myuser) Gruppen=35103(myuser),55092(data),1408(othergroup)
When executing the java code
Files.newInputStream("/..../sample.pdf");
I get
java.nio.file.FileSystemException: /...../sample.pdf: Operation not permitted
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)