LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-19-2005, 10:42 PM   #1
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Rep: Reputation: 15
/etc/init.d/cyrus Shell Script 'Permission denied'


Hi all,

I am unable to launch cyrus-imap daemon using a shell script that is located in /etc/init.d/. To be a little more specific I created the shell script based on a online how to:


http://www.delouw.ch/linux/Postfix-C...l/install.html

The script is nothing fancy it is the following:

Code:
#!/bin/bash
#
# Cyrus startup script

case "$1" in
    start)
        # Starting SASL saslauthdaemon
        /usr/local/sbin/saslauthd -c -a pam&

        # Starting Cyrus IMAP Server
        /usr/cyrus/bin/master &
        ;;

    stop)

        # Stopping SASL saslauthdaemon
        killall saslauthd

        # Stopping Cyrus IMAP Server
        killall /usr/cyrus/bin/master

        ;;

    *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;

esac
I created the above script in a file named 'cyrus' its' full path being '/etc/init.d/cyrus'. I first created this using vi and did not chown or chmod the file or the directory. It gave the following error:

Quote:
foozle:/srv/www/htdocs/web-cyradm-0.5.4-1/config # /etc/init.d/cyrus start
bash: /etc/init.d/cyrus: Permission denied
I checked the owner = Root and group = Root. I then attempted to chown the cyrus script as 'chown 755 ...' . I attempted to issue the 'cyrus start' command (full path quoted above) and got the same permissions denied error. I again switched the user and group to chown cyrus:mail and again got the permissions denied error.

I then deleted the cyrus file and recreated it using kwrite. Still permissions denied, even after trying several different owners using chown.

I have googled and tried to match older posts in this forum but have yet to uncover a potential reason why this is failing and unfortunately no solution to the problem either.

I would appreciate your help. I know that it is something that is problem elementary; however it has been a long couple of days (You might think i'm an idiot because I have been attempting to get a full circle mail server running for almost one week - I have tried configurations for qmail and postfix; I have finally settled on postfix because Suse uses it natively. I would really like to get past this so if you have any ideas I welcome them.

Truly,
ServerStorm.

Last edited by ServerStorm; 01-19-2005 at 10:44 PM.
 
Old 01-19-2005, 10:53 PM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
It will need to be
Code:
chmod +x
to be executable.
 
Old 01-19-2005, 11:01 PM   #3
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi scuzzman

Big thanks, this is what it needed!

I have just recently come from the windows world so unfortunately the paradigms are different enough that even very simple solutions like the one you have provided are in the bottom of the gaps created by lack of knowledge and experience in Linux The good news is with each passing day it seems to get a little easier

Thanks again,
Truly,
ServeStorm (the forecast is calling for sunny skies)
 
Old 01-19-2005, 11:04 PM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Not a problem - glad to help.
Good luck on your trails with Linux and keep in mind we're available when you need us!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Denied for script accessing text file lobo1 Linux - General 2 06-28-2005 12:46 PM
User executing script: bad interpreter: Permission denied stefaandk Linux - Newbie 7 06-27-2005 09:53 AM
/bin/sh: /etc/init.d/xprint: Permission denied flyfastest Linux - Newbie 1 06-17-2005 04:24 AM
crontab failure: permission denied trying to run script hedpe Linux - Software 5 05-03-2005 07:07 PM
permission denied when executing my own script Red Squirrel Linux - Newbie 3 03-07-2004 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:03 AM.

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