Thursday, January 29, 2015

[Liferay][Tomcat] Permission Denied Errors in Catalina.out

Hi,

I have seen some people struggling with permission errors when running Liferay. Errors like below..


The main cause for these errors is that server was started with a user lets say A having permissions(like root) and then server was stopped and started by a user lets say B with limited permissions. Now entries in temp and several other places are owned by A and when B tries to start/restart server B is unable to access those files and get permission denied errors.



Other causes can also be that server files were copied by A,

Solution is simple, we know that we need to change the file permissions to the level of B. In linux, the command is : chown.

I could run the command to change owner of all the files at once.

chown -R ravi:ravi *

That's it. This command will modify the owner for all users.

Just in case, you want to know if any file is owned by a user, try this command. The command below will give you a list of all files owned by user root.

ls -laR | grep root

Hope this helps someone in need. :)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.