Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Just set up a dedicated database jail running databases/mariadb55-server and for some reason it won't start on demand nor on boot.

Any suggestions?

# service mysql-server start
Starting mysql.
/usr/sbin/daemon: Permission denied
/usr/local/etc/rc.d/mysql-server: WARNING: failed to start mysql

Not sure what permissions this error is referring to.

My environment:

# env
USER=root
LOGNAME=root
HOME=/root
SHELL=/bin/csh
BLOCKSIZE=K
MAIL=/var/mail/root
MM_CHARSET=UTF-8
LANG=en_US.UTF-8
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
TERM=screen-256color
HOSTTYPE=FreeBSD
VENDOR=amd
OSTYPE=FreeBSD
MACHTYPE=x86_64
SHLVL=1
PWD=/var/db
GROUP=wheel
HOST=db

Another question is, why mariadb55-server doesn't respect the /usr/local/etc/my.cnf rather uses /var/db/mysql/something ?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

OK i resolved the issue. Culprit was setting my /etc/pw.conf umask from 022 to 007 (trying to make it a bit more secure) which resulted in creating basejail's /usr directory with 750 permissions instead of 755 so offending /usr/sbin/daemon couldn't get reached from jail.

Immediately after rebooting the jail service started and works as it supposed to.

I kinda deserve a slap for this mess and I'm sorry. Lesson learned :/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.