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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-22-2005, 07:38 PM
|
#1
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Rep:
|
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.......
|
|
|
06-22-2005, 07:40 PM
|
#2
|
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783
Rep:
|
can you be more specific. What command did you try and created this error?
|
|
|
06-22-2005, 07:45 PM
|
#3
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Original Poster
Rep:
|
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.........
|
|
|
06-22-2005, 07:50 PM
|
#4
|
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783
Rep:
|
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.
|
|
|
06-22-2005, 07:56 PM
|
#5
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Original Poster
Rep:
|
Still cant solve the problem, anyone has idea on it?
Anyway thanks for the help perfect_circle 
|
|
|
06-22-2005, 08:03 PM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783
Rep:
|
are you root?
you need to be logged in as root to restart a server.
If not type in the terminal to became root.
What distro are u using?
|
|
|
06-22-2005, 08:09 PM
|
#7
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Original Poster
Rep:
|
I already login as root, but i dont know why this problem prompt out......
I am using Fedora Core 4
|
|
|
06-22-2005, 09:21 PM
|
#8
|
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783
Rep:
|
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.
|
|
|
01-20-2006, 01:45 PM
|
#9
|
LQ Newbie
Registered: Jan 2006
Posts: 1
Rep:
|
/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
|
|
|
01-20-2006, 02:22 PM
|
#10
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
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?
|
|
|
01-20-2006, 04:32 PM
|
#11
|
Member
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|