LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-22-2005, 08:38 PM   #1
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Rep: Reputation: 30
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
anyone have the idea to fix this, please help
Thank You.......
 
Old 06-22-2005, 08:40 PM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
can you be more specific. What command did you try and created this error?
 
Old 06-22-2005, 08:45 PM   #3
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
This happen when i am trying to restart a service name call "nagios"

Code:
/etc/rc.d/init/nagios restart
Anyone knows, please help
Thank You.........
 
Old 06-22-2005, 08:50 PM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
Quote:
Originally posted by dwarf007
This happen when i am trying to restart a service name call "nagios"

Code:
/etc/rc.d/init/nagios restart
Anyone knows, please help
Thank You.........
probably the file /etc/rc.d/init/nagios has no execute permissions.
SO try:
Code:
 bash /etc/rc.d/init/nagios restart
or
Code:
. /etc/rc.d/init/nagios restart
or give execute permission to the file:
Code:
chmod +x /etc/rc.d/init/nagios
and try your command again.
I would recomment the first 2 options.

*EDIT*
try
Code:
ls -l /etc/rc.d/init/nagios
to see the file permissions.

Last edited by perfect_circle; 06-22-2005 at 08:52 PM.
 
Old 06-22-2005, 08:56 PM   #5
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Still cant solve the problem, anyone has idea on it?
Anyway thanks for the help perfect_circle
 
Old 06-22-2005, 09:03 PM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
are you root?
you need to be logged in as root to restart a server.
If not type
Code:
su
in the terminal to became root.
What distro are u using?
 
Old 06-22-2005, 09:09 PM   #7
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
I already login as root, but i dont know why this problem prompt out......
I am using Fedora Core 4
 
Old 06-22-2005, 10:21 PM   #8
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
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.
 
Old 01-20-2006, 02:45 PM   #9
moon305
LQ Newbie
 
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
/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
 
Old 01-20-2006, 03:22 PM   #10
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
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"
What happens if you login as postgres and run the following:

Code:
/usr/local/pgsql/bin/postmaster -S -i -B 2048
Is postgres the correct username?
 
Old 01-20-2006, 05:32 PM   #11
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 363

Rep: Reputation: 32
In Fedora, you should use the following to restart a command:
Code:
/sbin/service nagios restart

Last edited by saman007uk; 01-20-2006 at 05:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/.: Permission denied aizkorri Programming 9 03-17-2010 02:33 PM
Problem Cannot execute /bin/bash: Permission denied xeo Linux - Software 2 10-13-2004 11:55 PM
Cannot execute /bin/bash: Permission denied Hegemon Linux - General 4 01-19-2004 05:13 AM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 08:46 AM
cannot execute /bin/bash: Permission Denied peeples Linux From Scratch 24 10-25-2002 09:07 AM


All times are GMT -5. The time now is 06:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration