~alpine/users

1

crontab -e discards changes

David Demelier <markand@malikania.fr>
Details
Message ID
<0a0034b6-06dd-11ac-ec76-5d302b7ba3d8@malikania.fr>
DKIM signature
missing
Download raw message
Hello,

I've installed Alpine on my raspberry pi (but as sys mode) so / is 
mounted rw all the time.

I use crond from busybox as default, and wanted to edit the root's 
crontab. As root I ran `crontab -e` and it opened up vim with the 
default rules.

I've added a new line at the end as usual

0 6 * * * mycommand

And saved, but once I re-opened `crontab -e` the file was as original 
and my changes discarded.

There are no messages in /var/log/messages related to this trouble. 
Also, as simple user I get the error saying that crontab isn't setuid:

crontab: must be suid to work properly

So I suppose I simply need to `chmod 4755 $(which crontab)` but wanted 
to be sure I don't do something wrong :)

Regards,

-- 
David
Marco Dickert <marco@misterunknown.de>
Details
Message ID
<20200120154606.GA13044@marco.themis.pinknet.de>
In-Reply-To
<0a0034b6-06dd-11ac-ec76-5d302b7ba3d8@malikania.fr> (view parent)
DKIM signature
missing
Download raw message
On 2020-01-20 15:32:29, David Demelier wrote:
> I use crond from busybox as default, and wanted to edit the root's crontab.
> As root I ran `crontab -e` and it opened up vim with the default rules.
> 
> I've added a new line at the end as usual
> 
> 0 6 * * * mycommand
> 
> And saved, but once I re-opened `crontab -e` the file was as original and my
> changes discarded.

Weird. I can reproduce this issue. Seems to be bug in connection with
vim as the default editor. In a freshly started alpine:edge without vim
you can edit the crontab as usual.

I'm not quite sure what exactly the problem is, with nano it also works
as expected. I guess it's worth a bug report here [1].

[1] https://gitlab.alpinelinux.org/

-- 
Marco Dickert
marco@misterunknown.de
https://misterunknown.de
Reply to thread Export thread (mbox)