Question

what are the default owner:group of the directories in /var?

  • Posted October 21, 2013

I am a noob, and chown’d everything in /var. I have LAMP on Ubuntu 12.04 and would like to get the following directories properly owned: backups cache lib local lock log mail opt run spool tmp

TIA

Subscribe
Share

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

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.

I was trying to set the www directories and didn’t think about other directories in /var. <br> <br>Thanks Oliver!

<b>“…chown’d everything in /var.”</b> <br> <br>Why would you do that? Did you read that somewhere?

Sorry, but you actually screwed it up. You can’t undo the chown command. However, since it’s just the /var directory that have messed permissions, you could try to fix them manually. On my Ubuntu 12.04 machine, permissions are as follows: <br> <br><pre> <br>drwxr-xr-x 13 root root 4096 Oct 16 18:48 . <br>drwxr-xr-x 22 root root 4096 Sep 9 05:02 … <br> <br>drwxr-xr-x 2 root root 4096 Oct 17 07:35 backups <br>drwxr-xr-x 12 root root 4096 Sep 9 09:17 cache <br>drwxr-xr-x 40 root root 4096 Oct 15 15:44 lib <br>drwxrwsr-x 2 root staff 4096 Apr 19 2012 local <br>lrwxrwxrwx 1 root root 9 Oct 8 09:45 lock -> /run/lock <br>drwxr-xr-x 9 root root 4096 Oct 22 07:35 log <br>drwxrwsrwt 2 root mail 4096 Oct 21 23:15 mail <br>drwxr-xr-x 2 root root 4096 Apr 26 2012 opt <br>lrwxrwxrwx 1 root root 4 Oct 8 09:45 run -> /run <br>drwxr-xr-x 8 root root 4096 Sep 23 05:31 spool <br>drwxrwxrwt 2 root root 4096 Sep 9 05:02 tmp <br>drwx------ 2 root bin 4096 Oct 8 09:45 webmin <br>drwxr-xr-x 25 root root 4096 Oct 16 09:50 www <br></pre> <br> <br>and /var <br><pre>drwxr-xr-x 13 root root 4096 Oct 16 18:48 var</pre> <br> <br>Be very careful when you’re setting permissions.