>Description:
Directory layout and permissions on my test system are:
# mysql home
drwxr-x--- 12 root sql 1024 Mar 14 06:18 /home/sql/
# the storage for databasese
drwxr-x--- 4 sql sql 1024 Mar 14 08:28 /home/sql/var/
# all other directories are like this one
drwxr-xr-x 3 root root 1024 Mar 14 06:14 share
When the server is started with parameter "--user=sql" the following
error appears in error log:
990314 8:23:48 /data/home/sql/libexec/mysqld: Can't create/write to
file '/home/sql/var/mysqld.pid' (Errcode: 13)
My wild guess is that there are some private access checks in your
code which do not work properly (I didn't understand anything from
your source code after being at Finnish USENET meeting and having a
few drinks 8-)
Oh yes, if the server is started from root account it is possible to
change the uid but the process still has priviledged group access
rights. At least I didn't find a way to change the gid. That would be
a good feature to add !
>How-To-Repeat:
See above.
>Fix:
Before you say that the permissions are set up weirdly/wrong by me I
must stress that this problem does NOT occur if I start the server
with command:
su sql -c "/home/sql/bin/safe_mysqld --user=sql \
--pid-file=/home/sql/var/mysqld.pid"
This is also the quickest way to fix the problem in mysql.server
script...
>Submitter-Id: <submitter ID>
>Originator: tymiwi@stripped
>Organization:
University of Tampere
>MySQL support: none
>Synopsis: File access problem
>Severity: non-critical
>Priority: low
>Category: mysql
>Class: sw-bug
>Release: mysql-3.22.19b (Source distribution)
>Environment:
System: Linux fortunella 2.0.32 #2 Sat Sep 19 00:15:04 EET DST 1998 i586
unknown
Architecture: i586
Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.7.2.1/specs
gcc version 2.7.2.1
Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS=''
Configure command: ./configure --prefix=/home/sql
Perl: This is perl, version 5.004_01