It's a script and it's not owned by vmail so it can't be read by the shell.
You have to allow it to be readable to the user you are trying to run it as.
On Jul 12, 2012 10:22 PM, <li...@sbt.net.au> wrote:

>
> >>> Please copy the entire crontab entry here (no typing, I suspect you
> >>> have typos).  This message reads a bit like something is looking for a
> >>> binary called "bin/sh /usr/local/bin/arch".
> > lists> crontab -e -u vmail
> > Add a #!/bin/sh at the start.  Otherwise a POSIX_compliant shell won't
> > necessarily run it -- cron uses /bin/sh not bash.
> >
> > Make sure the mode of the file is 755 --- do
> > chmod +x /usr/local/bin/arch
>
> Peter, thnaks
>
> still having probs:
> it's not the bin/bash in the second script ?
>
> Cron  /usr/local/bin/arch
> From:   "Cron Daemon"
> To:     vmail
> /bin/sh: /usr/local/bin/arch: Permission denied
>
> grep vmail /etc/passwd
> vmail:x:5000:5000::/home/vmail:/bin/nologin
>
> ls -al /usr/local/bin/arch
> -rwx--x--x 1 voytek voytek 816 Jul  7 21:39 /usr/local/bin/arch
>
> # head  /usr/local/bin/arch
> #!/bin/sh
> cd /var/mail/vhosts
> /usr/local/bin/archmail dom.tld
> ...
>
>  head  /usr/local/bin/archmail
> #!/bin/bash
>  case $# in
>       1)
>       DOMAIN=$1
> ...
>
> but, fwiw, the other cron script run ok
>
> 15 1 * * * /usr/local/bin/arch
> 0 1 * * * /usr/local/bin/archivemail -d 30 --delete
> /var/mail/vhosts/v...@dom.tld
>
>
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to