I am a user and I am not able to add/edit crons.
I am a user of a Linux Server and whenever I try to edit crons. I get this error.
Code:
crontabs/user/: fdopen: Permission denied Code:
crontabs/user/: fopen: Permission denied It is sure that I am not able to create it in proper manner, it must be my mistake. I am missing something. Please tell me what should I do to get permission to add edit crons. I have found this error on google but it gives solutions of these error and it is not helping me. Code:
/var/spool/cron/crontabs/nick: Permission denied $ ls -l /usr/bin/crontab Code:
-rwxr-xr-x 1 root root 34784 Jun 13 10:58 /usr/bin/crontab Thank you very much ! |
There is no setuid bit. Naturally normal user cant run crontab
Code:
$ ls -l /usr/bin/crontab |
Since you mentioned that you do not have any sudo priviledges then as a normal user you can't edit crontab like root do.
However, you can edit you own crontab entries using: Code:
~$ crontab -e |
Quote:
Only way is to tell the SU, to set setuid, which is the normal permission for /usr/bin/crontab Code:
# chmod +s /usr/bin/crontab |
crontab -e is not working for me, it shows
Quote:
Quote:
The command you have suggested shows Quote:
Are you sure, there is no other way to set cron by my own. I am asking because I have already done some silly mistakes before and the tasks could be easily done by me, I have requested to root through mail and he has done on my system to show how could I do them. Now this time I don't want to be novice. That's why I was asking :( Thanks to all of you for your kind help. |
@unclesamcrazy
The command i suggested should be run as root. since you executed it as normal user, it failed. As for setuid bit, i cross checked it with fresh copy of centos6.4 and ubuntu 10.04 In CentOS, crontab's owner/group is root, and setuid is set for user root. Code:
$ ls -l /usr/bin/crontab Code:
$ ls -l /usr/bin/crontab Code:
# chmod u+s /usr/bin/crontab Code:
# chmod g+s /usr/bin/crontab |
Thanks mddesai for your solution.
I tried this yesterday on my home system because I can not do this on company server. I had installed ubuntu on my system so when I logged in as a user and tried to set cron, I faced same problem. because the permission of the file was Quote:
Quote:
Quote:
Quote:
I don't know If these working two will work on CentOS or other two or only one will work what you mentioned above. I can't check on CentOS. |
All times are GMT -5. The time now is 01:48 PM. |