3

Ok I just royally screwed up my /var folder's permissions.

I thought I was inside /var/www and did a chmod xxx ./* on the parent folder /var instead.

Now all the permissions inside /var are messed up. What can I do to correct it?

4

My /var/ holds the folllowing files:

drwxr-xr-x  2 root root  4096 2012-04-05 04:51 backups
drwxr-xr-x 12 root root  4096 2012-04-03 07:06 cache
drwxrwsrwt 31 root whoopsie 4096 2012-04-03 07:06 crash
drwxr-xr-x 31 root root  4096 2012-04-03 07:06 lib
drwxrwsr-x  2 root staff 4096 2008-04-15 05:53 local
lrwxrwxrwt  3 root root     9 2012-04-03 07:09 lock -> /run/lock
drwxr-xr-x 14 root root  4096 2012-05-15 04:40 log
drwxrwsrwt  2 root mail  4096 2010-07-23 07:32 mail
drwxr-xr-x  2 root root  4096 2009-02-12 08:08 opt
lrwxr-xr-x 15 root root   520 2012-05-15 07:55 run -> /run
drwxr-xr-x  7 root root  4096 2010-07-23 07:20 spool
drwxrwxrwt  2 root root  4096 2012-05-14 14:20 tmp

From this you should be able to set permissions back to what they need to be.

  • Thanks, I had another installation but triple checking is always good. :D Now, I have tried nearly everything to get drwxrwsrwton /var/crash but the closest I can get is drwsrwsrwt. What does the chmod permission number look like for the crash folder? – Tek May 15 '12 at 22:44
  • You got me there; never noticed user does not have 's' set :P Should not be a problem though. I believe it was 2000 that sets it to a system (setgid bit) (mkssoftware.com/docs/man1/chmod.1.asp) – Rinzwind May 16 '12 at 8:51
  • This just helped me resolve a nasty mysql wont start problem. I reset my /var permissions to your and it magically started. – OpenCoderX Jan 3 '13 at 19:30
  • You are welcome @opensourcechris Thanks for the upvote (if that was you ;) ) – Rinzwind Jan 3 '13 at 20:23
  • It was me. You are welcome! – OpenCoderX Jan 3 '13 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.