LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   /etc/init.d/cyrus Shell Script 'Permission denied' (https://www.linuxquestions.org/questions/linux-software-2/etc-init-d-cyrus-shell-script-permission-denied-279979/)

ServerStorm 01-19-2005 10:42 PM

/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.

scuzzman 01-19-2005 10:53 PM

It will need to be
Code:

chmod +x
to be executable.

ServerStorm 01-19-2005 11:01 PM

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 :o 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)

scuzzman 01-19-2005 11:04 PM

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


All times are GMT -5. The time now is 05:43 PM.