In Linux, crontab cannot be executed by common users.

Source: Internet
Author: User
Article Title: crontab cannot be executed by common users in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Problem: One of the Linux servers in use cannot be executed under normal users until the beginning and end of the crontab. The error seteuid: Operation not permitted is always prompted during execution, to use crontab, you need to switch to the root user, and then execute crontab-u username-e to edit it. Later, google found that the problem lies in the file permission, file/usr/bin/crontab is not privileged.

Solution: The permission before the change is

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

The modified permission is

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

Because crontab is used for files other than crontab, and normal users of those files do not have permission to change, they need to increase their privileges on the file system, this allows you to change the permissions of other files. The above method is to switch to the root user before executing

Chmod u + s/usr/bin/crontab

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.