I just installed Ubuntu 12.04 in a pendrive, then installed MySQL and Apache PHP and then I tried to install Moodle (a distance learning platform I use at work).
The installation in Moodle stopped when the program tried to create a folder called moodledata inside the folder /var, and did not have permission to do so.
So I did a chmod 777 to folder /var and removed the blockade, but I fear what I have done is not safe and I want to go back to the previous (initial/default) permission value of /var
I can't find anywhere what value should it be. Can you help me?
Ubuntu – the default permission of folder /var
permissionsUbuntu
Best Answer
The default permission for
/var
is 755 =rwxr-xr-x
: readable and executable (you need both for a directory) by everyone, and only writable by root.Setting the permission on a file or directory to 777 is never right. In your case, you should
www-data
if the web application is supposed to write to this directory, orroot
if not);/var/www
for a web application).