You are not logged in.

#1 2015-11-20 17:21:31

capoeira
Member
From: Vila Velha - Brasil
Registered: 2010-05-25
Posts: 470

[solved] can't edit crontabs (permission problem it seams)

when I try to edit crontabs (for my user) I get:

Traceback (most recent call last):
  File "/usr/bin/crontab", line 345, in <module>
    action(cron_file, args)
  File "/usr/bin/crontab", line 273, in replace
    prefix=args.user + '.', delete=False)
  File "/usr/lib/python3.5/tempfile.py", line 548, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
  File "/usr/lib/python3.5/tempfile.py", line 260, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
PermissionError: [Errno 13] Permission denied: '/var/spool/cron/studio.te3409yx'

is it normal that it looks for "/var/spool/cron/studio.te3409yx"?

permissions of "/var/spool/cron/studio":

[studio@studiohost ~]$ ls -al /var/spool/cron/studio
-rw------- 1 studio users 383 Set 11  2013 /var/spool/cron/studio

Last edited by capoeira (2015-11-21 03:55:50)

Offline

#2 2015-11-20 17:36:30

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [solved] can't edit crontabs (permission problem it seams)

Probably want:

chmod u+s /usr/bin/crontab

Although, you should ask yourself why this is broken for only you wink

Offline

#3 2015-11-20 19:41:39

capoeira
Member
From: Vila Velha - Brasil
Registered: 2010-05-25
Posts: 470

Re: [solved] can't edit crontabs (permission problem it seams)

brebs wrote:

Probably want:

chmod u+s /usr/bin/crontab

that didn't work

brebs wrote:

Probably want:



Although, you should ask yourself why this is broken for only you wink

yea, my old car (some years without reinstall + eternal newbie) has some "hickups" in the motor

Offline

#4 2015-11-20 19:57:38

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [solved] can't edit crontabs (permission problem it seams)

capoeira wrote:

PermissionError: [Errno 13] Permission denied: '/var/spool/cron/studio.te3409yx'
is it normal that it looks for "/var/spool/cron/studio.te3409yx"?

no that's not normal as crontab editing usually opens a temporary file in /tmp rather than in /var/spool/cron

Presumably to edit your own crontab file you are using

crontab -e

or for a users crontab you are using

crontab -u username

and not trying to edit a file directly?

Offline

#5 2015-11-20 20:35:26

capoeira
Member
From: Vila Velha - Brasil
Registered: 2010-05-25
Posts: 470

Re: [solved] can't edit crontabs (permission problem it seams)

paulkerry wrote:
capoeira wrote:

PermissionError: [Errno 13] Permission denied: '/var/spool/cron/studio.te3409yx'
is it normal that it looks for "/var/spool/cron/studio.te3409yx"?

no that's not normal as crontab editing usually opens a temporary file in /tmp rather than in /var/spool/cron

Presumably to edit your own crontab file you are using

crontab -e

or for a users crontab you are using

crontab -u username

and not trying to edit a file directly?


just the comand "crontab -e" allready produces the error (without editing anything):

[studio@studiohost ~]$ crontab -e
unexpected error, your edit is kept here:/tmp/crontab_ilx6td8y
Traceback (most recent call last):
  File "/usr/bin/crontab", line 345, in <module>
    action(cron_file, args)
  File "/usr/bin/crontab", line 202, in edit
    prefix=args.user + '.', delete=False)
  File "/usr/lib/python3.5/tempfile.py", line 548, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
  File "/usr/lib/python3.5/tempfile.py", line 260, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
PermissionError: [Errno 13] Permission denied: '/var/spool/cron/studio.9027851o'
[studio@studiohost ~]$

EDIT: it seams systemd-cron is producing the problem. I changed to cronie and now it is working.

should I notifie the AUR maintainer of the package?

Last edited by capoeira (2015-11-20 20:39:55)

Offline

#6 2015-11-20 21:58:45

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [solved] can't edit crontabs (permission problem it seams)

I am unsure why you would have installed something from the AUR rather than cronie which is in core?
I think you must have just installed the AUR package by mistake as the two packages appear to do different things.

Glad you got it sorted. Remember to make this topic as solved.

Offline

Board footer

Powered by FluxBB