LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 07: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, 07:40 PM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
can you be more specific. What command did you try and created this error?
 
Old 06-22-2005, 07: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, 07:50 PM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
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 07:52 PM.
 
Old 06-22-2005, 07: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, 08:03 PM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
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, 08: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, 09:21 PM   #8
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
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, 01: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, 02:22 PM   #10
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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, 04:32 PM   #11
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

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

Last edited by saman007uk; 01-20-2006 at 04: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 01:33 PM
Problem Cannot execute /bin/bash: Permission denied xeo Linux - Software 2 10-13-2004 10:55 PM
Cannot execute /bin/bash: Permission denied Hegemon Linux - General 4 01-19-2004 04:13 AM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 07:46 AM
cannot execute /bin/bash: Permission Denied peeples Linux From Scratch 24 10-25-2002 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration