Hi, this should be fixed in coming Lucene 5.3: https://issues.apache.org/jira/browse/LUCENE-6542
The reason for this behavior is that we need to ensure that the directory exists before we open it. For that it calls Files.createDirectories - which requires write access. The fix only calls createDirectories if the index does not exist. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Nicola Buso [mailto:nb...@ebi.ac.uk] > Sent: Wednesday, August 12, 2015 10:57 AM > To: java-user@lucene.apache.org > Subject: Strange Directory open exception > > Hi, > > we are migrating to Lucene 5 and we have a strange Exception that was not > happening in Lucene 4. > We are indexing in a pre-production environment and we move the index in > the production environment later; in the prod env the indices are visible to > our application with read-only rights. To clarify the read -only rights are at > both level of mount definition and user rights on File System. > If we mount the partition in read-write and we keep the user that's running > our application with read-only rights the Exception is not happening. > > The exception: > > > java.nio.file.FileSystemException: > /nfs/public/ro/ebinocle/prod/search/sra-analysis/150810_131208/main: > Read-only file system > 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.createDirectory(UnixFileSystemProvide > r.java:383) > at java.nio.file.Files.createDirectory(Files.java:630) > at > java.nio.file.Files.createAndCheckIsDirectory(Files.java:734) > at java.nio.file.Files.createDirectories(Files.java:720) > at > org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:128) > at > org.apache.lucene.store.NIOFSDirectory.<init>(NIOFSDirectory.java:64) > at > org.apache.lucene.store.NIOFSDirectory.<init>(NIOFSDirectory.java:74) > > > Is this a known behavior? do you think the java.nio framework should > behave differently? > > We are on Redhat Enterprise 6: 2.6.32-504.8.1.el6.x86_64 #1 SMP > > > > > Nicola > > > -- > Nicola Buso > Software Engineer - Web Production Team > > European Bioinformatics Institute (EMBL-EBI) European Molecular Biology > Laboratory > > Wellcome Trust Genome Campus > Hinxton > Cambridge CB10 1SD > United Kingdom > > URL: http://www.ebi.ac.uk > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org