crontab: âTemporary crontab no longer owned by you.â
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I reverted from Linuxmint 18 Cinnamon 64bit to Linuxmint 17.3 Cinnamon 64bit and can no longer create a cron job. I have separate root (/) and home (/home/my-user-name) partitions and left the home partition untouched when I did the 17.3 installation.
I was having all sorts of difficulties creating a cron job, so I installed gnome-scheduler and tried to create a cron job that way. I got a warning dialog box titled
"Warning: Working directory of executed tasks"
and the message content is
"Note about working directory of executed tasks: Recurrent tasks will
be run from the home directory."
I clicked OK and the job shows up in the terminal as follows:
$ crontab -l
* * * * * env DISPLAY=:0 /home/my-user-name/wallpaper_changer.sh >/dev/null 2>&1 # JOB_ID_4
My wallpaper does not change every minute as it should. The script runs just fine from the command line and produces no output. Permissions are 744 octal for the script. This all worked fine under Mint 18, but I had the script run just once a day. I set it to run every minute only for testing purposes.
If I try the normal cron job editing method, I get
$ crontab -e
Temporary crontab no longer owned by you.
Error while editing crontab
Then I get an empty nano buffer rather than the normal crontab template full of commented lines. When I try to write my nano buffer to file /tmp/crontab.lmuwIe/crontab I get this error message:
[ Error writing /tmp/lmuwIe/crontab: Permission denied ]
Finally,
$ ls -l /usr/bin/crontab
-rwsr-xr-x 1 root crontab 35984 Feb 9 2013 /usr/bin/crontab
Will I ever be able to create a cron job again?
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
@Gilles
Well I've made a lot of progress. I got rid of all the error weirdness by reinstalling cron. Now everything works just as it should when I use
$ crontab -e
except that the script I've been using for years doesn't run.
But another script does run; so I'm lost.
Here's what I've got right now:
$ crontab -l
* * * * * env DISPLAY=:0.0 /home/my-user-name/wallpaper_changer.sh
* * * * * date >> /home/my-user-name/crontest.txt
(I didn't include the 20-odd lines of comments that precede the cron jobs.)
The date job runs exactly as it should but the wallpaper_changer.sh job doesn't do anything. I've used this for years and now it doesn't work. The script works fine from the command line and used to work fine from cron.
$ ls -l /home/my-user-name/wallpaper_changer.sh
-rwxr-xr-x 1 my-user-name my-user-name 694 Jun 2 14:30 /home/my-user-name/wallpaper_changer.sh
$ echo $DISPLAY
:0.0
What's up with this?
cron
 |Â
show 4 more comments
up vote
2
down vote
favorite
I reverted from Linuxmint 18 Cinnamon 64bit to Linuxmint 17.3 Cinnamon 64bit and can no longer create a cron job. I have separate root (/) and home (/home/my-user-name) partitions and left the home partition untouched when I did the 17.3 installation.
I was having all sorts of difficulties creating a cron job, so I installed gnome-scheduler and tried to create a cron job that way. I got a warning dialog box titled
"Warning: Working directory of executed tasks"
and the message content is
"Note about working directory of executed tasks: Recurrent tasks will
be run from the home directory."
I clicked OK and the job shows up in the terminal as follows:
$ crontab -l
* * * * * env DISPLAY=:0 /home/my-user-name/wallpaper_changer.sh >/dev/null 2>&1 # JOB_ID_4
My wallpaper does not change every minute as it should. The script runs just fine from the command line and produces no output. Permissions are 744 octal for the script. This all worked fine under Mint 18, but I had the script run just once a day. I set it to run every minute only for testing purposes.
If I try the normal cron job editing method, I get
$ crontab -e
Temporary crontab no longer owned by you.
Error while editing crontab
Then I get an empty nano buffer rather than the normal crontab template full of commented lines. When I try to write my nano buffer to file /tmp/crontab.lmuwIe/crontab I get this error message:
[ Error writing /tmp/lmuwIe/crontab: Permission denied ]
Finally,
$ ls -l /usr/bin/crontab
-rwsr-xr-x 1 root crontab 35984 Feb 9 2013 /usr/bin/crontab
Will I ever be able to create a cron job again?
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
@Gilles
Well I've made a lot of progress. I got rid of all the error weirdness by reinstalling cron. Now everything works just as it should when I use
$ crontab -e
except that the script I've been using for years doesn't run.
But another script does run; so I'm lost.
Here's what I've got right now:
$ crontab -l
* * * * * env DISPLAY=:0.0 /home/my-user-name/wallpaper_changer.sh
* * * * * date >> /home/my-user-name/crontest.txt
(I didn't include the 20-odd lines of comments that precede the cron jobs.)
The date job runs exactly as it should but the wallpaper_changer.sh job doesn't do anything. I've used this for years and now it doesn't work. The script works fine from the command line and used to work fine from cron.
$ ls -l /home/my-user-name/wallpaper_changer.sh
-rwxr-xr-x 1 my-user-name my-user-name 694 Jun 2 14:30 /home/my-user-name/wallpaper_changer.sh
$ echo $DISPLAY
:0.0
What's up with this?
cron
it sounds to me like something is scanning /tmp and resetting permissions or ownerships
â Jeff Schaller
Sep 23 '16 at 17:16
Downgrading is not officially supported. Something specific to Mint 18 must have crept into a configuration file somewhere. This is possibly related to the location of temporary files. Post the output ofecho "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)"
â Gilles
Sep 23 '16 at 20:14
@Gilles: echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)" TMPDIR= ls: cannot access : No such file or directory drwxrwxrwt 15 root root 4096 Sep 24 11:27 /tmp drwx------ 2 my-user-name my-user-name 4096 Sep 24 11:27 /tmp/tmp.6QGdOkrYg4
â Don Nadie
Sep 24 '16 at 14:39
Everything looks normal with temporary files in general so I guess the problem is with cron. Doescrontab -e
work (editing root's crontab, which is neither your crontab nor the system crontab)? What's the output ofsudo ls -la /var/spool/cron/crontabs
?
â Gilles
Sep 24 '16 at 17:20
@Gilles: $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
â Don Nadie
Sep 26 '16 at 17:02
 |Â
show 4 more comments
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I reverted from Linuxmint 18 Cinnamon 64bit to Linuxmint 17.3 Cinnamon 64bit and can no longer create a cron job. I have separate root (/) and home (/home/my-user-name) partitions and left the home partition untouched when I did the 17.3 installation.
I was having all sorts of difficulties creating a cron job, so I installed gnome-scheduler and tried to create a cron job that way. I got a warning dialog box titled
"Warning: Working directory of executed tasks"
and the message content is
"Note about working directory of executed tasks: Recurrent tasks will
be run from the home directory."
I clicked OK and the job shows up in the terminal as follows:
$ crontab -l
* * * * * env DISPLAY=:0 /home/my-user-name/wallpaper_changer.sh >/dev/null 2>&1 # JOB_ID_4
My wallpaper does not change every minute as it should. The script runs just fine from the command line and produces no output. Permissions are 744 octal for the script. This all worked fine under Mint 18, but I had the script run just once a day. I set it to run every minute only for testing purposes.
If I try the normal cron job editing method, I get
$ crontab -e
Temporary crontab no longer owned by you.
Error while editing crontab
Then I get an empty nano buffer rather than the normal crontab template full of commented lines. When I try to write my nano buffer to file /tmp/crontab.lmuwIe/crontab I get this error message:
[ Error writing /tmp/lmuwIe/crontab: Permission denied ]
Finally,
$ ls -l /usr/bin/crontab
-rwsr-xr-x 1 root crontab 35984 Feb 9 2013 /usr/bin/crontab
Will I ever be able to create a cron job again?
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
@Gilles
Well I've made a lot of progress. I got rid of all the error weirdness by reinstalling cron. Now everything works just as it should when I use
$ crontab -e
except that the script I've been using for years doesn't run.
But another script does run; so I'm lost.
Here's what I've got right now:
$ crontab -l
* * * * * env DISPLAY=:0.0 /home/my-user-name/wallpaper_changer.sh
* * * * * date >> /home/my-user-name/crontest.txt
(I didn't include the 20-odd lines of comments that precede the cron jobs.)
The date job runs exactly as it should but the wallpaper_changer.sh job doesn't do anything. I've used this for years and now it doesn't work. The script works fine from the command line and used to work fine from cron.
$ ls -l /home/my-user-name/wallpaper_changer.sh
-rwxr-xr-x 1 my-user-name my-user-name 694 Jun 2 14:30 /home/my-user-name/wallpaper_changer.sh
$ echo $DISPLAY
:0.0
What's up with this?
cron
I reverted from Linuxmint 18 Cinnamon 64bit to Linuxmint 17.3 Cinnamon 64bit and can no longer create a cron job. I have separate root (/) and home (/home/my-user-name) partitions and left the home partition untouched when I did the 17.3 installation.
I was having all sorts of difficulties creating a cron job, so I installed gnome-scheduler and tried to create a cron job that way. I got a warning dialog box titled
"Warning: Working directory of executed tasks"
and the message content is
"Note about working directory of executed tasks: Recurrent tasks will
be run from the home directory."
I clicked OK and the job shows up in the terminal as follows:
$ crontab -l
* * * * * env DISPLAY=:0 /home/my-user-name/wallpaper_changer.sh >/dev/null 2>&1 # JOB_ID_4
My wallpaper does not change every minute as it should. The script runs just fine from the command line and produces no output. Permissions are 744 octal for the script. This all worked fine under Mint 18, but I had the script run just once a day. I set it to run every minute only for testing purposes.
If I try the normal cron job editing method, I get
$ crontab -e
Temporary crontab no longer owned by you.
Error while editing crontab
Then I get an empty nano buffer rather than the normal crontab template full of commented lines. When I try to write my nano buffer to file /tmp/crontab.lmuwIe/crontab I get this error message:
[ Error writing /tmp/lmuwIe/crontab: Permission denied ]
Finally,
$ ls -l /usr/bin/crontab
-rwsr-xr-x 1 root crontab 35984 Feb 9 2013 /usr/bin/crontab
Will I ever be able to create a cron job again?
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
@Gilles
Well I've made a lot of progress. I got rid of all the error weirdness by reinstalling cron. Now everything works just as it should when I use
$ crontab -e
except that the script I've been using for years doesn't run.
But another script does run; so I'm lost.
Here's what I've got right now:
$ crontab -l
* * * * * env DISPLAY=:0.0 /home/my-user-name/wallpaper_changer.sh
* * * * * date >> /home/my-user-name/crontest.txt
(I didn't include the 20-odd lines of comments that precede the cron jobs.)
The date job runs exactly as it should but the wallpaper_changer.sh job doesn't do anything. I've used this for years and now it doesn't work. The script works fine from the command line and used to work fine from cron.
$ ls -l /home/my-user-name/wallpaper_changer.sh
-rwxr-xr-x 1 my-user-name my-user-name 694 Jun 2 14:30 /home/my-user-name/wallpaper_changer.sh
$ echo $DISPLAY
:0.0
What's up with this?
cron
cron
edited Oct 1 '16 at 14:32
asked Sep 23 '16 at 16:08
Don Nadie
4517
4517
it sounds to me like something is scanning /tmp and resetting permissions or ownerships
â Jeff Schaller
Sep 23 '16 at 17:16
Downgrading is not officially supported. Something specific to Mint 18 must have crept into a configuration file somewhere. This is possibly related to the location of temporary files. Post the output ofecho "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)"
â Gilles
Sep 23 '16 at 20:14
@Gilles: echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)" TMPDIR= ls: cannot access : No such file or directory drwxrwxrwt 15 root root 4096 Sep 24 11:27 /tmp drwx------ 2 my-user-name my-user-name 4096 Sep 24 11:27 /tmp/tmp.6QGdOkrYg4
â Don Nadie
Sep 24 '16 at 14:39
Everything looks normal with temporary files in general so I guess the problem is with cron. Doescrontab -e
work (editing root's crontab, which is neither your crontab nor the system crontab)? What's the output ofsudo ls -la /var/spool/cron/crontabs
?
â Gilles
Sep 24 '16 at 17:20
@Gilles: $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
â Don Nadie
Sep 26 '16 at 17:02
 |Â
show 4 more comments
it sounds to me like something is scanning /tmp and resetting permissions or ownerships
â Jeff Schaller
Sep 23 '16 at 17:16
Downgrading is not officially supported. Something specific to Mint 18 must have crept into a configuration file somewhere. This is possibly related to the location of temporary files. Post the output ofecho "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)"
â Gilles
Sep 23 '16 at 20:14
@Gilles: echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)" TMPDIR= ls: cannot access : No such file or directory drwxrwxrwt 15 root root 4096 Sep 24 11:27 /tmp drwx------ 2 my-user-name my-user-name 4096 Sep 24 11:27 /tmp/tmp.6QGdOkrYg4
â Don Nadie
Sep 24 '16 at 14:39
Everything looks normal with temporary files in general so I guess the problem is with cron. Doescrontab -e
work (editing root's crontab, which is neither your crontab nor the system crontab)? What's the output ofsudo ls -la /var/spool/cron/crontabs
?
â Gilles
Sep 24 '16 at 17:20
@Gilles: $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
â Don Nadie
Sep 26 '16 at 17:02
it sounds to me like something is scanning /tmp and resetting permissions or ownerships
â Jeff Schaller
Sep 23 '16 at 17:16
it sounds to me like something is scanning /tmp and resetting permissions or ownerships
â Jeff Schaller
Sep 23 '16 at 17:16
Downgrading is not officially supported. Something specific to Mint 18 must have crept into a configuration file somewhere. This is possibly related to the location of temporary files. Post the output of
echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)"
â Gilles
Sep 23 '16 at 20:14
Downgrading is not officially supported. Something specific to Mint 18 must have crept into a configuration file somewhere. This is possibly related to the location of temporary files. Post the output of
echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)"
â Gilles
Sep 23 '16 at 20:14
@Gilles: echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)" TMPDIR= ls: cannot access : No such file or directory drwxrwxrwt 15 root root 4096 Sep 24 11:27 /tmp drwx------ 2 my-user-name my-user-name 4096 Sep 24 11:27 /tmp/tmp.6QGdOkrYg4
â Don Nadie
Sep 24 '16 at 14:39
@Gilles: echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)" TMPDIR= ls: cannot access : No such file or directory drwxrwxrwt 15 root root 4096 Sep 24 11:27 /tmp drwx------ 2 my-user-name my-user-name 4096 Sep 24 11:27 /tmp/tmp.6QGdOkrYg4
â Don Nadie
Sep 24 '16 at 14:39
Everything looks normal with temporary files in general so I guess the problem is with cron. Does
crontab -e
work (editing root's crontab, which is neither your crontab nor the system crontab)? What's the output of sudo ls -la /var/spool/cron/crontabs
?â Gilles
Sep 24 '16 at 17:20
Everything looks normal with temporary files in general so I guess the problem is with cron. Does
crontab -e
work (editing root's crontab, which is neither your crontab nor the system crontab)? What's the output of sudo ls -la /var/spool/cron/crontabs
?â Gilles
Sep 24 '16 at 17:20
@Gilles: $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
â Don Nadie
Sep 26 '16 at 17:02
@Gilles: $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
â Don Nadie
Sep 26 '16 at 17:02
 |Â
show 4 more comments
2 Answers
2
active
oldest
votes
up vote
2
down vote
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
The ownership of /var/spool/cron/crontabs/my-user-name
is wrong. You should be the owner. That would explain why cron can't overwrite the file. Also the file would normally be in crontab
group but I don't think it matters.
You can fix this by running
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
I don't know what could have caused this and I don't see how it could be related to a system downgrade. The underlying issues might cause other problems.
Thanks for trying, but the problem remains as before. First I triedsudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Then I tried$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.
â Don Nadie
Sep 29 '16 at 12:09
@DonNadie Hmmm. I don't know. Please test whethercrontab -e
works as root, and create a new test user and test whethercrontab -e
works as that user.
â Gilles
Sep 29 '16 at 12:29
1
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
add a comment |Â
up vote
0
down vote
You need to edit permissions on the crontab binary and set them back to what they are when you do a fresh install.
NOT WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwsr-xr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Action, do as root or using sudo:
chmod **g+s** /usr/bin/crontab<br>
chmod **u-s** /usr/bin/crontab
WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwxr-sr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Taken from a fresh working installation, the working permissions are set during installation.
No idea why they changed later on.
New contributor
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
The ownership of /var/spool/cron/crontabs/my-user-name
is wrong. You should be the owner. That would explain why cron can't overwrite the file. Also the file would normally be in crontab
group but I don't think it matters.
You can fix this by running
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
I don't know what could have caused this and I don't see how it could be related to a system downgrade. The underlying issues might cause other problems.
Thanks for trying, but the problem remains as before. First I triedsudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Then I tried$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.
â Don Nadie
Sep 29 '16 at 12:09
@DonNadie Hmmm. I don't know. Please test whethercrontab -e
works as root, and create a new test user and test whethercrontab -e
works as that user.
â Gilles
Sep 29 '16 at 12:29
1
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
add a comment |Â
up vote
2
down vote
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
The ownership of /var/spool/cron/crontabs/my-user-name
is wrong. You should be the owner. That would explain why cron can't overwrite the file. Also the file would normally be in crontab
group but I don't think it matters.
You can fix this by running
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
I don't know what could have caused this and I don't see how it could be related to a system downgrade. The underlying issues might cause other problems.
Thanks for trying, but the problem remains as before. First I triedsudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Then I tried$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.
â Don Nadie
Sep 29 '16 at 12:09
@DonNadie Hmmm. I don't know. Please test whethercrontab -e
works as root, and create a new test user and test whethercrontab -e
works as that user.
â Gilles
Sep 29 '16 at 12:29
1
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
add a comment |Â
up vote
2
down vote
up vote
2
down vote
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
The ownership of /var/spool/cron/crontabs/my-user-name
is wrong. You should be the owner. That would explain why cron can't overwrite the file. Also the file would normally be in crontab
group but I don't think it matters.
You can fix this by running
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
I don't know what could have caused this and I don't see how it could be related to a system downgrade. The underlying issues might cause other problems.
$ sudo ls -la /var/spool/cron/crontabs
total 12
drwx-wx--T 2 root crontab 4096 Sep 25 03:23 .
drwxr-xr-x 5 root root 4096 Sep 23 00:05 ..
-rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
The ownership of /var/spool/cron/crontabs/my-user-name
is wrong. You should be the owner. That would explain why cron can't overwrite the file. Also the file would normally be in crontab
group but I don't think it matters.
You can fix this by running
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
I don't know what could have caused this and I don't see how it could be related to a system downgrade. The underlying issues might cause other problems.
answered Sep 26 '16 at 17:19
Gilles
512k12010151547
512k12010151547
Thanks for trying, but the problem remains as before. First I triedsudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Then I tried$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.
â Don Nadie
Sep 29 '16 at 12:09
@DonNadie Hmmm. I don't know. Please test whethercrontab -e
works as root, and create a new test user and test whethercrontab -e
works as that user.
â Gilles
Sep 29 '16 at 12:29
1
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
add a comment |Â
Thanks for trying, but the problem remains as before. First I triedsudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Then I tried$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that$ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got$ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.
â Don Nadie
Sep 29 '16 at 12:09
@DonNadie Hmmm. I don't know. Please test whethercrontab -e
works as root, and create a new test user and test whethercrontab -e
works as that user.
â Gilles
Sep 29 '16 at 12:29
1
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
Thanks for trying, but the problem remains as before. First I tried
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got $ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Thanks for trying, but the problem remains as before. First I tried
sudo chown my-user-name /var/spool/cron/crontabs/my-user-name
so that $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name my-user-name 188 Sep 25 03:23 my-user-name
and got $ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
â Don Nadie
Sep 29 '16 at 12:01
Then I tried
$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got $ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.â Don Nadie
Sep 29 '16 at 12:09
Then I tried
$ sudo chgrp crontab /var/spool/cron/crontabs/my-user-name
so that $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 my-user-name crontab 188 Sep 25 03:23 my-user-name
and got $ crontab -e Temporary crontab no longer owned by you. Error while editing crontab
again. When nano starts, there's no crontab template with a bunch of commented lines. Everything goes south just as in my previous comments.â Don Nadie
Sep 29 '16 at 12:09
@DonNadie Hmmm. I don't know. Please test whether
crontab -e
works as root, and create a new test user and test whether crontab -e
works as that user.â Gilles
Sep 29 '16 at 12:29
@DonNadie Hmmm. I don't know. Please test whether
crontab -e
works as root, and create a new test user and test whether crontab -e
works as that user.â Gilles
Sep 29 '16 at 12:29
1
1
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
@DonNadie Edit your question, not my answer.
â Gilles
Sep 29 '16 at 16:44
add a comment |Â
up vote
0
down vote
You need to edit permissions on the crontab binary and set them back to what they are when you do a fresh install.
NOT WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwsr-xr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Action, do as root or using sudo:
chmod **g+s** /usr/bin/crontab<br>
chmod **u-s** /usr/bin/crontab
WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwxr-sr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Taken from a fresh working installation, the working permissions are set during installation.
No idea why they changed later on.
New contributor
add a comment |Â
up vote
0
down vote
You need to edit permissions on the crontab binary and set them back to what they are when you do a fresh install.
NOT WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwsr-xr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Action, do as root or using sudo:
chmod **g+s** /usr/bin/crontab<br>
chmod **u-s** /usr/bin/crontab
WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwxr-sr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Taken from a fresh working installation, the working permissions are set during installation.
No idea why they changed later on.
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You need to edit permissions on the crontab binary and set them back to what they are when you do a fresh install.
NOT WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwsr-xr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Action, do as root or using sudo:
chmod **g+s** /usr/bin/crontab<br>
chmod **u-s** /usr/bin/crontab
WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwxr-sr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Taken from a fresh working installation, the working permissions are set during installation.
No idea why they changed later on.
New contributor
You need to edit permissions on the crontab binary and set them back to what they are when you do a fresh install.
NOT WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwsr-xr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Action, do as root or using sudo:
chmod **g+s** /usr/bin/crontab<br>
chmod **u-s** /usr/bin/crontab
WORKING permissions:
ls -la /usr/bin/crontab<br>
**-rwxr-sr-x** 1 root crontab 40264 Oct 7 2017 /usr/bin/crontab
Taken from a fresh working installation, the working permissions are set during installation.
No idea why they changed later on.
New contributor
edited Oct 1 at 9:38
RobotJohnny
710216
710216
New contributor
answered Oct 1 at 8:01
TheFrog
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f311903%2fcrontab-temporary-crontab-no-longer-owned-by-you%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
it sounds to me like something is scanning /tmp and resetting permissions or ownerships
â Jeff Schaller
Sep 23 '16 at 17:16
Downgrading is not officially supported. Something specific to Mint 18 must have crept into a configuration file somewhere. This is possibly related to the location of temporary files. Post the output of
echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)"
â Gilles
Sep 23 '16 at 20:14
@Gilles: echo "TMPDIR=$TMPDIR"; ls -ld /tmp "$TMPDIR" "$(mktemp -d)" TMPDIR= ls: cannot access : No such file or directory drwxrwxrwt 15 root root 4096 Sep 24 11:27 /tmp drwx------ 2 my-user-name my-user-name 4096 Sep 24 11:27 /tmp/tmp.6QGdOkrYg4
â Don Nadie
Sep 24 '16 at 14:39
Everything looks normal with temporary files in general so I guess the problem is with cron. Does
crontab -e
work (editing root's crontab, which is neither your crontab nor the system crontab)? What's the output ofsudo ls -la /var/spool/cron/crontabs
?â Gilles
Sep 24 '16 at 17:20
@Gilles: $ sudo ls -la /var/spool/cron/crontabs total 12 drwx-wx--T 2 root crontab 4096 Sep 25 03:23 . drwxr-xr-x 5 root root 4096 Sep 23 00:05 .. -rw------- 1 root my-user-name 188 Sep 25 03:23 my-user-name
â Don Nadie
Sep 26 '16 at 17:02