2009/10/12 matzehuber <[email protected]>:
>
>
>
> Joachim Ott-3 wrote:
>>
>> 2009/10/12 Matthias Huber <[email protected]>:
>>> Joachim Ott schrieb:
>>>
>>> 2009/10/11 Matthias Huber <[email protected]>:
>>>
>>>
>>> (vixie) cron package misses /var/spool/crontabs so the crontab-command
>>> does'nt store the crontab and no command is executed.
>>>
>>>
>>> If you're talking about the standard cron that comes with shr-u: it
>>> stores the tables in /var/cron/tabs - I could not successfully install
>>> one with "crontab -e" for root too, but it worked for a non-root user.
>>> I couldn't investigate this further because strace doesn't work with
>>> suid-programs.
>>>
>>>
>>>
>>> i could successfull bring it to work as root with an mkdir
>>> /var/spool/crontabs
>>
>> I must have the BSD-version of vixie-cron then. As non-root, I got a
>> file /var/cron/tabs/ott with "crontab -e", and for root, I always get
>> "crontab: no changes made to crontab".
>>
>
> ahhh ok, i tried to reproduce, and i was in the wood:
> now i see the problem: (as root)
> crontab -e doesn't work,
> but crontab <file> does.

I watched it with strace, and it seems that the crontab-program
doesn't get the new mtime-value from the filesystem: it makes 2
fstat64-calls, one before calling the editor and one after, but the
mtime hasn't changed:

4072  fstat64(6, {st_dev=makedev(0, 16), st_ino=18918,
st_mode=S_IFREG|0600, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=0, st_size=0, st_atime=2009/10/12-20:04:14,
st_mtime=2009/10/12-20:04:14, st_ctime=2009/10/12-20:04:14}) = 0

4072  fstat64(6, {st_dev=makedev(0, 16), st_ino=18918,
st_mode=S_IFREG|0600, st_nlink=0, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=0, st_size=0, st_atime=2009/10/12-20:04:22,
st_mtime=2009/10/12-20:04:14, st_ctime=2009/10/12-20:05:33}) = 0

atime und ctime have changed, mtime not, that's why it says:

crontab: no changes made to crontab

I wonder why it works for a non-root user, but I cannot strace that.
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to