Crontab : Permission denied [Solved]

Discussions Regarding Software

Moderator: Moderators

Post Reply
nobicycle
Simple Hen
Posts: 77
Joined: Fri Nov 20, 2009 13:55

Crontab : Permission denied [Solved]

Post by nobicycle » Thu Nov 24, 2011 18:03

User added to cron group:
sudo gpasswd -a `whoami` cron
Adding user adrfhi to group cron

ERROR
crontab -l
cannot chdir(/var/spool/cron), bailing out.
/var/spool/cron: Permission denied


This is a recent Sabayon 7 install.
uname -a
Linux sabayon 3.1.0-sabayon #1 SMP Sat Nov 12 08:03:21 UTC 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

Thanks for any suggestions
Last edited by nobicycle on Mon Nov 28, 2011 18:19, edited 1 time in total.

svantoviit
Old Dear Hen
Posts: 730
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: Crontab : Permission denied

Post by svantoviit » Thu Nov 24, 2011 18:45

Code: Select all

less /etc/group | grep cron
cron:x:16:cron
crontab:x:1008:
Try to add your user to crontab group.
Or edit crontab as root.

User avatar
sabayonino
Sagely Hen
Posts: 3290
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Crontab : Permission denied

Post by sabayonino » Thu Nov 24, 2011 18:46

nobicycle wrote:User added to cron group:
sudo gpasswd -a `whoami` cron
Adding user adrfhi to group cron

ERROR
crontab -l
cannot chdir(/var/spool/cron), bailing out.
/var/spool/cron: Permission denied


This is a recent Sabayon 7 install.
uname -a
Linux sabayon 3.1.0-sabayon #1 SMP Sat Nov 12 08:03:21 UTC 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

Thanks for any suggestions
When adding your user (or other) to the cron group, make sure that the user log out and back in for the group change to take effect.then you can edit your crontab

Code: Select all

$ crontab -e
[Che Cos'è Il Calcolo Distribuito (BOINC)

BOINC ready ! Sabayon+BOINC = BILD ,my Sabayon spin :cyclops: - Ready to crunch for the Science everywhere :)

nobicycle
Simple Hen
Posts: 77
Joined: Fri Nov 20, 2009 13:55

Re: Crontab : Permission denied (SOLVED)

Post by nobicycle » Mon Nov 28, 2011 18:17

Thanks. That worked

Post Reply