Hello,
We are using Alfresco Content Services 5.2.5 (installation using the .zip).
When starting Alfresco, the following error is shown in the logs:
java.io.FileNotFoundException: alfresco.log (Permission denied)
I have tried to make sure all log4j settings are coherent.
We want to write logs to the /var/log/alfresco folder.
log4j.appender.File.File=/var/log/alfresco/alfresco.log has been set to both:
a) webapps/alfresco/WEB-INF/classes/log4j.properties
b) /opt/tomcat7/shared/classes/alfresco/extension/custom-log4j.properties
1) How can we fix this error?
2) Is it relevant? Logs seem to be written to /var/log/alfresco/alfresco.log.
Regards,
Liviu
It seems , you have linux system and the user using which ou are starting the server does not have access to read or write in log files.Starting server using sudo/admin might resolve your issue.Other way will be to give read write permission to normal user using which you are starting the alfresco.
Krutik Jayswal Thanks, but my permissions are fine (permissions are set to the tomcat7 user, as they should be).
I belive the issue is related to the following discussions:
https://issues.alfresco.com/jira/browse/MNT-18557
https://issues.alfresco.com/jira/browse/MNT-14859
https://issues.alfresco.com/jira/browse/REPO-4278
https://issues.alfresco.com/jira/browse/REPO-4512
Quote from REPO-4512:
The current alfresco.log configuration is stored inside the war file, see.
The configuration creates the alfresco.log in the base directory, which is often Tomcat root. This contradicts with security best practices around file permissions which require Tomcat root to be read only. Note that overrides in the custom-log4j.properties does not solve this issue.
One has to modify the internals of the war file (log4j.properties) and specify the correct path to the logs folder to mitigate this issue.It is bad practice to modify the internals of the war file.
but I am unable to understand the conclusion or to find a fix.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.