This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: another cron problem - permission denied


Which version of cron are you running?

At least part of the problem is the permission of the files in
/var/cron.

1. Please read /usr/doc/Cygwin/cron.README, in particular:

>
>3.0.1-6:
>--------
>
>Add a postinstall script which creates the /var/cron and /var/cron/tabs
>directories appropriately.
>
>3.0.1-5:
>--------
>
>Crontab now changes group membership to be SYSTEM on the crontab
>files and sets the permissions to 640.  That should allow cron
>to work immediately with the crontab files created by crontab.
>Note that this requires that /etc/group has been created and
>contains the default SYSTEM entry, gid 18. DON'T CHANGE THAT!

2. You should have a file named 'cron.sh.done' in the directory
/etc/postinstall.
You might try removing your /var/cron directory tree and then running
that file/script.  If you don't have it, here is a copy:

#!/bin/sh

set -x

if [ ! -d /var/cron ]
then
  mkdir -p /var/cron
fi
chmod 1777 /var/cron

if [ ! -d /var/cron/tabs ]
then
  mkdir /var/cron/tabs
fi
chmod 1777 /var/cron/tabs


> -----Original Message-----
> From: Ralf Habacker [mailto:Ralf.Habacker@freenet.de]
> Sent: Friday, August 02, 2002 6:10 AM
> To: cygwin
> Subject: another cron problem - permission denied 
> 
> 
> Hi,
> 
> I have done a fresh cygwin minimal installation on a winnt 
> workstation with cron
> and ssmtp.
> Then I've tried to install a crontab with crontab -e. After 
> saving the file,
> crontab gives the following messages:
> 
> $ crontab -e
> no crontab for administrator - using an empty one
> crontab: installing new crontab
> crontab: error renaming tabs/tmp.000614 to tabs/administrator
> rename: Permission denied
> crontab: edits left in /tmp/crontab.614
> 
> Because I know that cygwin 1.3.12 uses a more stricter right 
> handling, I've made
> sure that the User are in /etc/passwd, but I really does not 
> know what the
> reason is for this.
> 
> Thanks for any help
> 
> Ralf
> 
> 
> 
> $cat /etc/passwd
> Jeder:*:0:0:,S-1-1-0::
> SYSTEM:*:18:18:,S-1-5-18::
> Administratoren:*:544:544:,S-1-5-32-544::
> admin:unused_by_nt/2000/xp:1003:513:U-MOSKAU\admin,S-1-5-21-20
> 70571487-181613977
> 0-162667069-1003:/home/admin:/bin/bash
> Administrator:unused_by_nt/2000/xp:500:513:U-MOSKAU\Administra
> tor,S-1-5-21-20705
> 71487-1816139770-162667069-500:/home/Administrator:/bin/bash
> admin:unused_by_nt/2000/xp:1004:513:U-MOSKAU\dbadmin,S-1-5-21-
> 2070571487-1816139
> 770-162667069-1004:/home/dbadmin:/bin/bash
> Gast:unused_by_nt/2000/xp:501:513:U-MOSKAU\Gast,S-1-5-21-20705
> 71487-1816139770-1
> 62667069-501:/home/Gast:/bin/bash
> 
> $ cat /etc/group
> Jeder:S-1-1-0:0:
> SYSTEM:S-1-5-18:18:
> Kein:S-1-5-21-2070571487-1816139770-162667069-513:513:
> Administratoren:S-1-5-32-544:544:
> Benutzer:S-1-5-32-545:545:
> Gäste:S-1-5-32-546:546:
> Hauptbenutzer:S-1-5-32-547:547:
> Replikations-Operator:S-1-5-32-552:552:
> Sicherungs-Operatoren:S-1-5-32-551:551:
> informix:S-1-5-21-2070571487-1816139770-162667069-1007:1007:
> ORA_DBA:S-1-5-21-2070571487-1816139770-162667069-1000:1000:
> 
> $ find  /var/cron -exec ls -nl {} \;
> total 4
> drwxr-xr-x    2 500      513          4096 Aug  2 12:14 tabs
> total 6
> -rw-r--r--    1 500      513           207 Aug  2 12:14 tmp.000508
> -rw-r--r--    1 500      513           206 Aug  2 12:08 tmp.000587
> -rw-r--r--    1 500      513           206 Aug  2 11:01 tmp.000597
> -rw-r--r--    1 500      513           206 Aug  2 11:02 tmp.000600
> -rw-r--r--    1 500      513           206 Aug  2 11:55 tmp.000603
> -rw-r--r--    1 500      513           206 Aug  2 11:58 tmp.000614
> -rw-r--r--    1 500      513           207 Aug  2 12:14
> /var/cron/tabs/tmp.000508
> -rw-r--r--    1 500      513           206 Aug  2 12:08
> /var/cron/tabs/tmp.000587
> -rw-r--r--    1 500      513           206 Aug  2 11:01
> /var/cron/tabs/tmp.000597
> -rw-r--r--    1 500      513           206 Aug  2 11:02
> /var/cron/tabs/tmp.000600
> -rw-r--r--    1 500      513           206 Aug  2 11:55
> /var/cron/tabs/tmp.000603
> -rw-r--r--    1 500      513           206 Aug  2 11:58
> /var/cron/tabs/tmp.000614
> 
> $ cygcheck -c
> Cygwin Package Information
> Package             Version
> _update-info-dir    00037-1
> ash                 20020131-1
> bash                2.05b-1
> cron                3.0.1-7
> cygrunsrv           0.95-1
> cygwin              1.3.12-2
> diff                1.0-1
> diffutils           2.8.1-1
> fileutils           4.1-1
> findutils           4.1.7-4
> gawk                3.0.4-1
> gdbm                1.8.0-4
> grep                2.5-1
> gzip                1.3.3-3
> libintl1            0.10.40-1
> libncurses5         5.2-1
> libncurses6         5.2-8
> libreadline4        4.1-2
> libreadline5        4.3-1
> login               1.4-3
> ncurses             5.2-8
> pcre                3.7-1
> readline            4.3-1
> sed                 3.02-1
> sh-utils            2.0-2
> ssmtp               2.38.7-3
> tar                 1.13.19-1
> termcap             20020403-1
> terminfo            5.2-3
> texinfo             4.2-3
> textutils           2.0.21-1
> vim                 6.1-2
> which               1.5-1
> zlib                1.1.4-1
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]