Weird behavior of crontab -e

Greetings!

I had to completely set up a server due to a messed up update, but now crontab -e refuses to work properly.
When invoking crontab -e without a crontab installed for a particular user it tells me “No crontab for <user> - using an empty one” … and hangs … and hangs…

For some reason crontab fails to invoke the editor, requiring that CTRL-C is pressed. However, in that moment crontab isn’t just aborted, but the editor is coming up instead.

Then, when attempting to edit the crontab (that is, pressing I in vim) suddenly displays “W10: Warning: Changing a readonly file” at the bottom line, but nevertheless switches to Insert mode.
Writing the desired data to the crontab works as expected, but when attempting to save I’m getting this: “E45: ‘readonly’ option is set (add ! to override)”
This can be overridden, and the crontab is installed normally.

However, when attempting to edit an existing crontab, the crontab command hangs again and requires that CTRL-C be pressed - but this time the existing crontab isn’t loaded, instead starting out empty.

Before having to install from scratch, however (I had upgraded the system from 12.3) everything had worked fine.

Anyone who knows what could be wrong here?

Might be a permission issue.

crontab has a special setup, as it needs root privileges to create/edit the crontabs:

wolfi@linux-lf90:~> ll /usr/bin/crontab -rwsr-xr-x 1 root trusted 55944 24. Jun 10:02 /usr/bin/crontab


Check whether yours is the same.

If not, run “sudo chkstat --system” to fix it, and post possible error messages you might get.
Actually it would be a good idea to run that anyway, it should fix most system file permission issues…

Nothing wrong here - the menu entry for crontab looks exactly like the one that you have posted here, and chkstat --system didn’t produce anything, either (the permissions for crontab have been corrected upon installation, though).
In fact, there’s no user besides root on said server…

On 2015-08-15 18:36, Robidu wrote:
> In fact, there’s no user besides root on said server…

I assume that means that you did not create a user, but the system users
do exist?

On the other hand, I believe you should have a plain user in the server,
and use it. Only for some tasks you’d need to use su or sudo.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))