On 01-11-17, Reco wrote: > Hi. > > On Wed, Nov 01, 2017 at 10:00:27AM +0100, Jochen Spieker wrote: > > deloptes: > > > > > > Indeed, thanks for the hint, however OP wanted to edit crontab, which > > > needs > > > root access. > > > > 'crontab -e' works for all users. > > A more correct way to put it is 'crontab utilizes root access'. > > $ ls -al /usr/bin/crontab > -rwxr-sr-x 1 root crontab 34936 May 3 2015 /usr/bin/crontab > > So, anyone can run crontab, that's true. > Does not change the fact that crontab runs as root. > > Reco >
That is SGID bit is for group, which is crontab, not root. On Debian, every user can edit its own crontab file by default, which can be changed if file /etc/cron.allow exists and user is added there, or if /etc/cron.deny exists and user is not there.