How to fix /bin/sh: bad interpreter: Permission denied

When i try to execute mysql_install_db on /home directory, i got an error like :

root@linux:~# /home/data/mysql/bin/mysql_install_db --user=mysql --basedir=/home/data/mysql
-bash: /home/data/mysql/bin/mysql_install_db: /bin/sh: bad interpreter: Permission denied

After I did some searching on google the problem was “no shell” in /home/data/ directory. And here is how to investigate and fix that problem :

root@smsgateway:~# mount | grep /home/data
/dev/sdb1 on /home/data type ext3 (rw,nosuid,nodev,noexec)

root@smsgateway:~# mount -o remount,exec /home/data/

Category: Linux | Tags: , , , , Comment »


Leave a Reply



Back to top