On Thu, Jun 03, 2010 at 02:20:17PM -0500, Derek Martin wrote: > On Thu, Jun 03, 2010 at 02:56:02PM -0400, Chris O'Connell wrote: > > root@SJ-MA-LX-Nagios:~# cat /etc/init.d/mysqld > > sudo mkdir /var/run/mysqld > > sudo chmod 777 /var/run/mysqld > > sudo /usr/sbin/mysqld & >=20 > Using sudo is not required here. Things started by init run as root. > You probably also don't want it to be 777, as that means anyone can > write and delete files in that directory. =20 I should be unequivocal. You DO NOT want this directory to be 777. If any user has shell access to the system, they can do really nasty things with this. For instance, assuming mysqld runs as root, any user could do the following: $ cd /var/run/mysqld $ rm $MYSQLD_PID_FILE $ ln -s /etc/passwd $MYSQLD_PID_FILE Now, granted you have some weirdness on your system that removes this directory, but if you didn't, this would result in mysqld overwriting your /etc/passwd with its pid the next time it started up. =20 Also, if this server is being used for anything other than testing, I would highly recommend you track down the source of the directory disappearing. That Shouldn't Happen=A2=E2 (unless my sysadmin skills have gotten even more crufty than I thought they had)... > The symlink need to be named in a specific way. Specifically, it > needs to start with the letter 'S' (it must be capital) and a 2-digit > number that indicates the order you want it to start relative to the > other services. Usually services which are not required to support > the proper running of the OS itself are given a relatively high > number, say in the 80's or 90's. So, for example, you might create it > as S90mysqld in /etc/rcX.d, where X=3D{1,2,3}. As you point out, it helps to actually put the symlink in the directory for the run level you're actually using. =3D8^) --=20 Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=3D-=3D-=3D-=3D- This message is posted from an invalid address. Replying to it will result= in undeliverable mail due to spam prevention. Sorry for the inconvenience.