How to check and modify permissions on the var/log directory?

Hi there. I have a web application, with Mautic CRM installed. Recently I changed the root password and that cause to have some issues with some files/pages on that application. The Mautic support team told me that I have to change the permissions in the var/log directory. So I want to know how to access that directory and how to actually change those permissions to perform some tests.

Thanks in advance!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @borthirylucas

First to say that changing the root password should cause any issue with the permissions and ownership of the files.

To change file/directory permissions you’ll want to use the chmod command:

chmod {options} filename

An example, the command will grant the owner of the file (referenced by u) executable permissions (referenced by +w) on the file index.html:

chmod u+x index.html

You can also use binary references to set file permissions for all users. (Use numbers in the chmod command)

An example, the command will give the owner that the file belongs to permissions to read and write to read and write the file (Read = 4, Write = 2, Execute = 1), whilst group and anyone else will only be able to read the file:

chmod 644 index.html

To check the ownership and permissions of the /var/log directory you can use the 'stat command:

  1. stat /var/log/

You can also use the ls -l /var/ command and then check the log directory permission.

Regards, Alex


You can check the permissions by using the ls -la command as follows:

ls -la /var/log

To change the permissions of a specific directory inside the /var/log directory, you could use the chmod command followed by the new set of permissions. I would recommend cross-checking with the Mautic support team the exact permissions that have to be set.

For more information on Linux permissions in general, I would recommend this tutorial here:

Best, Bobby