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]

crontab -e: error renaming tabs/tmp.000560 Permission denied


I have successfully gotten cron working on my W2K system.

However, because of permissions problems on the /var/cron/tabs directories, crontab
-e fails.

I can repeat the following steps to reproduce the problem:

cygrunsrv -E cron
cygrunsrv -R cron
cd /var
# (I have a whole collection of cron-* directories that I cannot delete
# if anyone can tell me how to delete them, please let me know!)
test -d cron && mv cron cron-`date +%Y%m%d%H%M%S`
# Here I make new cron/tabs directories and set permissions to 1777 as was
# suggested by this mailing list
mkdir cron
chmod 1777 cron
mkdir cron/tabs
chmod 1777 cron/tabs
# Here I create a new crontab file using crontab -e
# It works the first time
echo '* * * * * date > /tmp/date.cron' > /tmp/redo-cron.$$.1
echo ":0r/tmp/redo-cron.$$.1
ZZ" | crontab -e
# I can do crontab -l here an a single entry is displayed
# Now I install and start cron with
cygrunsrv -I cron -p /usr/sbin/cron -a'-D' -e "PATH=C:/cygwin/bin" -e "CYGWIN=tty
ntsec"
cygrunsrv -S cron

# At this point the permissions on /var/cron/tabs has been changed and crontab -e
does not work:
echo '* * * * * /home/ccobb/mycvs/ccobb/scripts/crontrace' > /tmp/redo-cron.$$.2
echo ":0r/tmp/redo-cron.$$.2
ZZ" | crontab -e

# the error output from crontab -e is:
crontab: error renaming tabs/tmp.000560 to tabs/ccobb
rename: Permission denied

At this point, if I use Windows Explorer to look at the properties on the cron
directory (Security tab), I get a dialog with:

    You only have permission to view the security information on cron.

For Everyone, the Allow and Deny columns are grayed out, and only the last four
entries are checked.  Full Control and Modify are unchecked and there is now way to
change them.

For SYSTEM, they are all still grayed out but all are checked.

I'm happy to have cron working, but how do I get crontab -e working?

cc




--
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]