Shot myself in the foot
OK, I made a mistake that is killing me. Long story, but I reset the permissions on /var/run to to be owned by root, group users with group having read/write as well. I then copied that down to the subfolders and stuff stopped working (most notably apache couldn't access mysql through the socket in /var/run/mysql).
Is there anyway to recover these permissions. Or in knowing how they should be set? (FWIW, I have backups but not of the entire /var tree) (FWIW2 - this is my home system and of not huge importance) Thanks |
/var/run
drwxr-xr-x 35 0 0 4096 2009-01-03 16:49 run The sub directorys have drwxr-xr-x 2 0 0 4096 2008-07-29 16:33 sshd |
You may get help from the script Alan Hicks posted on a.o.l.s. some years ago. The script uses Slackware's "slackware/MANIFEST.bz2" file to generate a load of commands that reset the permissions back to the original state of every file/directory installed by Slackware.
You can capture these commandlines (they are written to the standard output of the script) and remove everything you don't need (only the commands that change permissions and owndership below /var are relevant to you). You can find the posting of that script here: http://groups.google.nl/group/alt.os...1872abfdf2c110 Eric |
These are mine if they help
directories: Code:
root@jupiter:~# find /var/run -type d -exec ls -ld {} \; Code:
root@jupiter:~# find /var/run -type f -exec ls -ld {} \; |
Quote:
Brian |
Eric, I'm trying a hybrid approach. I'm reviewing the contents of MANIFEST And setting the perms by hand. I can always go back and cleanup MANIFEST and run the script. Thanks
Brian, when I set /var/run/mysql to mysql:mysql I get this error from a web app Code:
Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (13) |
what does "ls -l /var/run/mysql" show?
Brian |
Quote:
Code:
root@USlack2:/etc/cron.weekly# ls -l /var/run/mysql Note: this is a php app if it matters. |
Is that = sign at the end of mysql.sock a typo?
"chmod o+w /var/run/mysql.sock" should take care of it. Brian |
Following GazL's lead, here are mine (Slackware 12.1, basic install):
Code:
root@FamilyRoom:/# find /var/run -type d -exec ls -ld {} \; |
Quote:
Eric |
Quote:
Brian |
Solved
Quote:
Before: Code:
root@USlack2:/var/run/mysql# ls -l Code:
root@USlack2:/var/run/mysql# ls -l One other thing. the "=" is not a typo. It shows in the console like that. What does that mean? |
Quote:
|
I need to find a good tutorial on unix/linux rights. I know the basics, ok. But the sticky bit, uid & gid still trip me up. For instance, the "s" at the beginning of this line:
Code:
srwxrwxrwx 1 mysql mysql 0 2009-01-01 01:24 mysql.sock= |
Quote:
d = directory - = regular file l = symbolic link b = block device s = socket ... and some other less common ones. The Sticky bit is actually depicted by a 't' in the last column, e.g. drwxrwxrwt. Over the years, the purpose of the sticky bit has evolved. The wikipedia article linked above has more details. If you want a starting place to learn a little more, the following is quite often recommended: http://rute.2038bug.com/index.html.gz |
Quote:
|
Thanks everyone. System is working fine. I set the permissions by hand. Hopefully I'll be more careful in the future. I also learned a few things so all in all, it was a good day.
Happy New Year |
Quote:
Quote:
This alias is not set when using an X terminal. To simulate this just try "ls -lF" from the terminal. If you are seeing this odd behaviour from the console then check you have an "/etc/profile" and an "/etc/profile.d/coreutils-dircolors.sh" file that is marked as being executable. A standard full install should set these up to assign the dircolors and aliases. |
All times are GMT -5. The time now is 04:08 AM. |