Ordinary users under Linux can not directly use crontab problem

  

Problem situation: There is a Linux server used in a crontab can not be executed under normal users, always prompt error when executed: seteuid: Operation not permitted, to Use crontab to switch to the root user, then execute crontab -u username -e to edit, and later through google search to the problem is the file permissions, the file /usr/bin/crontab has no privileges.

Workaround: The permissions before the change are


-rwxr-xr-x 1 root root 70592 Jul 12 2005 /usr/bin/crontab


Changed permissions are


-rwsr-xr-x 1 root root 70592 Jul 12 2005 /usr/bin/crontab


Because crontab is used in addition to crontab Other files, and those ordinary users do not change the permissions, then now you need to increase his privilege on the file system, so that you can also change the permissions on other files, change the above method is to switch to the root user first Execute


chmod u+s /usr/bin/crontab

Copyright © Windows knowledge All Rights Reserved