su: /bin/bash: Permission denied
I am having a problem while i am trying to start a service , i got the below error
Code:
su: /bin/bash: Permission denied Thank You....... |
can you be more specific. What command did you try and created this error?
|
This happen when i am trying to restart a service name call "nagios"
Code:
/etc/rc.d/init/nagios restart Thank You......... |
Quote:
SO try: Code:
bash /etc/rc.d/init/nagios restart Code:
. /etc/rc.d/init/nagios restart Code:
chmod +x /etc/rc.d/init/nagios I would recomment the first 2 options. *EDIT* try Code:
ls -l /etc/rc.d/init/nagios |
Still cant solve the problem, anyone has idea on it?
Anyway thanks for the help perfect_circle :) |
are you root?
you need to be logged in as root to restart a server. If not type Code:
su What distro are u using? |
I already login as root, but i dont know why this problem prompt out......
I am using Fedora Core 4 |
I don't think this is the way to restart a service in fedora. This looks more like the slackware way :) Search your gnome menus. I'm pretty sure there is a utility for this.
|
/etc/rc.d/rc.local
#!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local /usr/local/sbin/vsftpd& POSTGRESDIR=/usr/local/pgsql if [ -x $POSTGRESDIR/bin/postmaster -a -d $POSTGRESDIR/data ];then rm -f /tmp/.s.PGSQL.5432 su - postgres -c "postmaster -S -i -B 2048" echo -n 'postmaster' fi # reboot the computer display the message su: /bin/bash: Permission denied OS : Fedora 4 |
Do you get the same error when you run the following as root:
Code:
su - postgres -c "/usr/local/pgsql/bin/postmaster -S -i -B 2048" Code:
/usr/local/pgsql/bin/postmaster -S -i -B 2048 |
In Fedora, you should use the following to restart a command:
Code:
/sbin/service nagios restart |
All times are GMT -5. The time now is 05:45 PM. |