cancel
Showing results for 
Search instead for 
Did you mean: 

Run Alfresco Using a non-root account

dbrands
Champ in-the-making
Champ in-the-making
I need to run the Tomcat instance supporting Alfresco using a non-root account.  When I attempt this the Alfresco application fails to start.  I have all relevant Alfresco files and directories owned my this user but, during startup the error below is encountered.  For brevity I have only pasted a portion of the stacktrace.  If the entire stacktrace is needed I can post.  I have noticed that when I start Tomcat as root several new files are created in the alf_data directory so I assume there must be some where in the configuration that specifies which user to use when creating/updating files in this directory.
Our other Tomcat instances run using this non-root account so this is not an issue.
Environment:
Alfresco Version:  Community Edition 2.0.0 build 185 schema 38
Tomcat Version:  5.5.17
OS:  Linux - RedHat Enterprise v4 update 2

15:40:02,816 ERROR [util.transaction.SpringAwareUserTransaction] Transaction didn't commit
org.alfresco.service.cmr.repository.ContentIOException: Failed to get writer
   at org.alfresco.repo.content.filestore.FileContentStore.getWriter(FileContentStore.java:276)
   at org.alfresco.repo.content.RoutingContentService.getTempWriter(RoutingContentService.java:396)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl2.indexProperty(LuceneIndexerImpl2.java:1632)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl2.createDocuments(LuceneIndexerImpl2.java:1277)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl2.indexImpl(LuceneIndexerImpl2.java:1170)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl2.indexImpl(LuceneIndexerImpl2.java:1158)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl2.flushPending(LuceneIndexerImpl2.java:961)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl2.prepare(LuceneIndexerImpl2.java:732)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory2.prepare(LuceneIndexerAndSearcherFactory2.java:706)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:599)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:657)
2 REPLIES 2

dbrands
Champ in-the-making
Champ in-the-making
Solved.
Turned out the directory specified by java.io.tmpdir had some files owned by root.  Once those files were cleaned up the Alfresco application started with Tomcat running as a non-root account.

mikeh
Star Contributor
Star Contributor
Thanks for the follow-up post with your solution.

Mike