cancel
Showing results for 
Search instead for 
Did you mean: 

org.alfresco.service.cmr.repository.ContentIOException: 11280000 Failed to create directory for file

cratlepeter
Champ on-the-rise
Champ on-the-rise

I'm just trying to get "community distribution content service 6.2-ga" installed on Debian 10.7 with "Apache Tomcat/9.0.31 (Debian)"  On the first run, I'm getting an error in creating the content directory.  I've dropped and recreated the database and user.  Any ideas why I'm getting the permission error and how I debug it in Tomcat ?

I'm getting "org.alfresco.service.cmr.repository.ContentIOException: 11280000 Failed to create directory for file storage: /var/documents/contentstore/2020/12/28/11/28" in alfresco.log

tomcat seems to have permission to the directory:

root@gpserver1:/var/log/tomcat9# ls -lR /var/documents
/var/documents:
total 12
drwx------ 2 tomcat tomcat 4096 Dec 28 08:31 contentstore
drwx------ 2 tomcat tomcat 4096 Dec 27 13:49 contentstore.deleted
drwx------ 2 tomcat tomcat 4096 Dec 28 08:21 keystore

/var/documents/contentstore:
total 0

/var/documents/contentstore.deleted:
total 0

/var/documents/keystore:
total 0

security manager is off:

root@xx:/var/log/tomcat9# grep -v ^# /etc/default/tomcat9

JAVA_OPTS="-Djava.awt.headless=true"

SECURITY_MANAGER=false

LOGFILE_COMPRESS=1

and alfresco-global.properties is set up:

system.serverMode=PRODUCTION

#
# Sample custom content and index data location
#
dir.root=/var/documents
dir.contentstore=/var/documents/contentstore
dir.contentstore.deleted=/var/documents/contentstore.deleted
# dir.keystore=${dir.root]/keystore/keystore

.

.

1 ACCEPTED ANSWER

cratlepeter
Champ on-the-rise
Champ on-the-rise

Turns out that Debian tomcat is sandboxed by systemd.  Read /usr/share/doc/tomcat9/README.Debian for more information.

View answer in original post

5 REPLIES 5

kaynezhang
World-Class Innovator
World-Class Innovator

Is tomcat the user that you are using to run alfresco ? since only the owner(tomcat) has permission to create folder and file in contentstore folder.

I believe that it's running as 'tomcat'.  The tomcat process runs as the tomcat user.

However, just to check I changed all permissions to be rwx and I still saw the same error.

blibanos
Champ in-the-making
Champ in-the-making

The folder that alfresco was trying to create was owned by the root user. changing it to alfresco(user starting the tomcat server) resolved the issue.  Thank you for your help

cratlepeter
Champ on-the-rise
Champ on-the-rise

Turns out that Debian tomcat is sandboxed by systemd.  Read /usr/share/doc/tomcat9/README.Debian for more information.