AnsweredAssumed Answered

Lucene creating directories as root

Question asked by bdmc on Apr 7, 2015
I have been working on correcting some issues today, among them ownership of files and directories everywhere that Alfresco lives.

I have changed the ownership of everything that I can find to tomcat.tomcat, restarted Tomcat from the user tomcat, and that seems to be working well, in general.

However, in apps/alfresco/data/lucene-indexes/workspace/SpacesStore, directories ( long hex strings ) are being created with root.root ownership.

This is causing errors ( Warnings ) in the logs, as:

13:57:09,676 WARN  [org.alfresco.repo.search.impl.lucene.index.IndexInfo] Index merger failed with
java.io.FileNotFoundException: /opt/alfresco-4.2.f-3/apps/alfresco/data/lucene-indexes/workspace/SpacesStore/faaaa8f9-a1d0-4d90-b60d-d6b9720f1b05/_0_1.del (Permission denied)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(Unknown Source)
        at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:682)
        at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:443)
        at org.apache.lucene.util.BitVector.write(BitVector.java:141)
        at org.apache.lucene.index.SegmentReader.commitChanges(SegmentReader.java:591)
        at org.apache.lucene.index.DirectoryIndexReader.doCommit(DirectoryIndexReader.java:279)
        at org.apache.lucene.index.IndexReader.commit(IndexReader.java:928)
        at org.apache.lucene.index.IndexReader.decRef(IndexReader.java:156)
        at org.apache.lucene.index.SegmentReader.decRef(SegmentReader.java:164)
        at org.apache.lucene.index.IndexReader.close(IndexReader.java:944)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo$Merger.mergeDeletions(IndexInfo.java:4019)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo$Merger.runImpl(IndexInfo.java:3575)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo$AbstractSchedulable.run(IndexInfo.java:3428)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)



Any suggestions?

Thanks,
Brian

Outcomes