Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101363 - dev-db/mysql: wrong permissions on /var/run/mysqld/
Summary: dev-db/mysql: wrong permissions on /var/run/mysqld/
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 11:19 UTC by Martin Mokrejš
Modified: 2005-08-04 13:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2005-08-04 11:19:37 UTC
If user enables in /etc/mysql/my.cnf

[mysqld]
# this can make it even more secure:
skip-networking

then ordinary users cannot connect to mysqld although they have in ~/.my.cnf

[client]
port=3306
#host=127.0.0.1
socket=/var/run/mysqld/mysqld.sock

The problem is that the /var/run/mysqld/ has no 'x' bit for everybody. It should
be either changed or noted in the my.cnf.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-08-04 11:36:23 UTC
Well, no... :-)

<snip>
 if ! useq minimal; then
                #empty dirs...
                [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g
mysql ${ROOT}/var/lib/mysql
                [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g
mysql ${ROOT}/var/run/mysqld
</snip>

$ ls -la /var/run/mysqld
total 5
drwxr-xr-x  2 mysql mysql 136 Aug  4 20:32 .
drwxr-xr-x  7 root  root  536 Jul 30 03:00 ..
-rw-r--r--  1 mysql mysql   0 Jul 23 15:26 .keep
-rw-rw----  1 mysql mysql   6 Aug  4 20:32 mysqld.pid
srwxrwxrwx  1 mysql mysql   0 Aug  4 20:32 mysqld.sock

If your permissions ended up otherwise, then it's not ebuils fault.
Comment 2 Martin Mokrejš 2005-08-04 13:02:50 UTC
At least dev-db/mysql-4.0.25-r2 does not reset the permissions to those you
reported if the directory already existed. If this is a bug or not depends ion
the interpretation. ;)