By nowell
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
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!
I was trying to set the www directories and didn’t think about other directories in /var. <br> <br>Thanks Oliver!
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.
<b>“…chown’d everything in /var.”</b> <br> <br>Why would you do that? Did you read that somewhere?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.