Some script execute permissions gone

pwaara

Member
Aug 10, 2016
22
1
53
Hawaii
cPanel Access Level
Root Administrator
This morning I saw that cpbackup failed to run due to "Permission denied" error. Looking at the scripts directory, I see several scripts have had their execute permissions removed. They are: cp-backup, make-config, upcp, and update_sa_config. Any ideas what may have happened, and what is the best way to fix the issue? Just go in and update the permissions?
 

ChrisI

Technical Analyst II
Mar 24, 2014
67
12
83
cPanel Access Level
Root Administrator
Hello!

The best way to try to track down how those were changed will likely be to use the stat command to find the times that they were changed before before changing the permissions back, then check the various logs and the bash history for anything that was done around that time. Also, note that /scripts/cp-backup and /scripts/make-config do not exist on my test server and update_sa_config does not have execute permissions. These are the correct permissions for update_sa_config and upcp.

[[email protected] scripts]# ll update_sa_config
-rw-r--r-- 1 root root 2083 Feb 17 00:34 update_sa_config

[[email protected] scripts]# ll upcp
-rwxr-xr-x 1 root root 28588 Apr 11 11:35 upcp

Thanks!
 

pwaara

Member
Aug 10, 2016
22
1
53
Hawaii
cPanel Access Level
Root Administrator
Sorry, I meant cpbackup.

Interestingly, the permissions have fixed themselves. I did nothing to change them in either direction. According to stat, the file was modified yesterday, but there is nothing in the history. While this has me curious as to how and why it happened, I don't have the time to track it down. It certainly was odd, though.