SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
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).
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)
Granting apache access to the directory resolves the problem. Any ideas?
root@USlack2:/etc/cron.weekly# ls -l /var/run/mysql
total 4
-rw-rw-r-- 1 mysql mysql 5 2009-01-01 01:24 mysql.pid
srwxrwxr-x 1 mysql mysql 0 2009-01-01 01:24 mysql.sock=
If I add the apache user to the mysql group, everything works.
Note: this is a php app if it matters.
"chmod o+w /var/run/mysql.sock" should take care of it.
Brian
OK, indeed it did. Question is, what did it do?
Before:
Code:
root@USlack2:/var/run/mysql# ls -l
-rw-rw-r-- 1 mysql mysql 5 2009-01-01 01:24 mysql.pid
srwxrwxr-x 1 mysql mysql 0 2009-01-01 01:24 mysql.sock=
root@USlack2:/var/run/mysql# chmod o+w mysql.sock
After:
Code:
root@USlack2:/var/run/mysql# ls -l
total 4
-rw-rw-r-- 1 mysql mysql 5 2009-01-01 01:24 mysql.pid
srwxrwxrwx 1 mysql mysql 0 2009-01-01 01:24 mysql.sock=
Looking at the results it appears you gave world(others) write rights. I was confused by the 'o' As I was thinking owner. 'man chmod' set me straight.
One other thing. the "=" is not a typo. It shows in the console like that. What does that mean?
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=
I assume that's sticky but I'm not sure what that means.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.