Results 1 to 4 of 4

Thread: Weird behavior of crontab -e

  1. #1

    Default Weird behavior of crontab -e


    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?

  2. #2

    Default Re: Weird behavior of crontab -e

    Quote Originally Posted by Robidu View Post
    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...

  3. #3

    Default Re: Weird behavior of crontab -e

    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...

  4. #4
    Join Date
    Feb 2009

    Default Re: Weird behavior of crontab -e

    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))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts