- 
      
- 
        Save lohithn4/69b7b6ba9e00dc10c073cc1ab2ed769a to your computer and use it in GitHub Desktop. 
Revisions
- 
        plembo revised this gist May 9, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,3 +24,5 @@ After fix: ```bash -rwxr-sr-x 1 root crontab 39352 Nov 16 2017 /usr/bin/crontab ``` Solution from [Ask Ubuntu: cannot access crontab after changing uid](https://askubuntu.com/questions/710671/cannot-access-crontab-after-changing-uid). 
- 
        plembo revised this gist May 9, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # When crontab gives fopen: permission denied error While trying to open my user's crontab on Ubuntu, the system barked back: ```bash $ crontab -l 
- 
        plembo renamed this gist May 9, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        plembo created this gist May 9, 2019 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ # Getting fopen: permission denied from crontab When trying to open my user's crontab on Ubuntu got: ```bash $ crontab -l crontabs/myuser/: fopen: Permission denied ``` This is due to improper permissions on crontab executable. To fix: ```bash $ sudo chown root:crontab /usr/bin/crontab $ sudo chmod 2755 /usr/bin/crontab ``` Mucked up perms: ```bash rwxr-xr-x 1 root root 39352 Nov 16 2017 /usr/bin/crontab ``` After fix: ```bash -rwxr-sr-x 1 root crontab 39352 Nov 16 2017 /usr/bin/crontab ```