You are not logged in.

#1 2009-05-03 06:41:14

Laplace's Daemon
Member
Registered: 2007-08-14
Posts: 30

Can't edit crontab as a user

I'm having a problem that I can't edit my crontab file as a user.  I get an error

$ crontab -e
02-May-2009 23:33  initgroups failed: david Operation not permittedunable to create /var/spool/cron/david.new: Permission denied
unable to append to /var/spool/cron/cron.update

But I can do

$ crontab -l
30 23 2 5 sat mplayer -playlist $HOME/.playlist

ever since I set the permissions of the file to

[/var/spool/cron]$ ls -l
total 8.0K
total 8
drwxr-xr-x 2 root root  96 2009-05-02 23:29 ./
drwxr-xr-x 5 root root 120 2009-01-19 10:35 ../
-rw-r--r-- 1 root root  48 2009-05-02 23:29 david
-rw------- 1 root root  28 2009-05-02 23:18 root

instead of -rw-------.

What can I do so that I can actually edit my crontab?

Offline

#2 2009-05-03 09:03:40

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Can't edit crontab as a user

Why did you change the permissions? Obviously that seems to be the problem.

crontab is root suid, so it will excute as root and it would appear to have a security feature that checks the permissions of the files.

Offline

#3 2009-05-03 16:53:02

Laplace's Daemon
Member
Registered: 2007-08-14
Posts: 30

Re: Can't edit crontab as a user

That makes more sense.  Somehow the setuid bet got unset on crontab.  Now it's working properly.

Offline

Board footer

Powered by FluxBB