I did crontab -e it popped up $EDITOR (vim), I added a line, saved, and crontab tells me that I didn't make changes and exits An strace shows [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 16748 fstat64(6, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 write(2, "crontab: no changes made to cron"..., 36crontab: no changes made to crontab ) = 36 unlink("/tmp/crontab.16747") = 0 brk(0) = 0x8052000 brk(0x8054000) = 0x8054000 time([1053049805]) = 1053049805 getpid() = 16747 rt_sigaction(SIGPIPE, {0x420db0d0, [], SA_RESTORER, 0x420276f8}, {SIG_DFL}, 8) = 0 send(3, "<78>May 15 18:50:05 crontab[1674"..., 59, 0) = 59 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0 exit_group(0)
marc_soft, is your /tmp directory a symlink by any chance? I have just built two RH9.0 servers, and on one the /tmp directory links to /var/tmp. It has the same problem with editing a crontab. The other one without the link works fine.
Yes, we also found out that the problem is that /tmp is a symlink. But the best part is that it works with EDITOR=emacs, but not EDITOR=vim
I found the fix: I symlinked /tmp to /var/tmp/tmp, and I had to modify vimrc as such: " for crontab -e to work set backupskip=/tmp/*,/var/tmp/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/* This started breaking with vim 6 (it worked before) While this isn't a bug, it's quite tough to spot. Maybe it should be in the release notes or something.
Re-assigning to vim.
Reassigning to RHEL 3, as the problem still happens on that version.
I am also having this problem but after going to the source of crontab.c it appears that pixie crontab is working properly and it is a problem with vim. (I see it has been reassigned) It appears that vim assigns a new I-node to the saved or new version of the crontab entry only if /tmp is a symlink. If /tmp is not a symlink then the I-node remains constant as the command crontab expects. Hope this is helpful, Chris
If you read the comments, you'll see that I already gave the solution :) set backupskip=/tmp/*,/var/tmp/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/* ^^^^^^^^^^^^^^^ whatever your symlink points to It's just an issue of documenting this somewhere as it's a change that can be non trivial to spot
I added the backupskip variable as described in comment 7. The only difference is I changed /var/tmp/tmp to /usr/tmp since that is what my /tmp directory is symlinked to. However it didn't fix the problem. I still was unable to save the crontab.
This bug is filed against RHEL 3, which is in maintenance phase. During the maintenance phase, only security errata and select mission critical bug fixes will be released for enterprise products. Since this bug does not meet that criteria, it is now being closed. For more information of the RHEL errata support policy, please visit: http://www.redhat.com/security/updates/errata/ If you feel this bug is indeed mission critical, please contact your support representative. You may be asked to provide detailed information on how this bug is affecting you.