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.
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.
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.