1

We have an odd problem on some of our RHEL Server 7.2 VM's:

Executing sudo chmod -R +rx doesn't change the read/directory flags for any of subdirectories. However, executing sudo chmod -R a+rx works just fine. e.g. for the java-agent folder below:

ls -la appdynamics/

drwxr-xr-x  4 appdynamics appdynamics   43 May  6 03:54 .
drwxr-xr-x. 8 root        root        4096 May  5 16:56 ..
drwx------  3 root        root          30 May  5 16:56 java-agent
drwxr-xr-x  3 root        root          17 May  6 03:54 machine-agent

sudo chmod -R +rx appdynamics 
ls -la appdynamics

drwxr-xr-x  4 appdynamics appdynamics   43 May  6 03:54 .
drwxr-xr-x. 8 root        root        4096 May  5 16:56 ..
drwx------  3 root        root          30 May  5 16:56 java-agent
drwxr-xr-x  3 root        root          17 May  6 03:54 machine-agent

sudo chmod -R a+rx appdynamics 
ls -la appdynamics

drwxr-xr-x  4 appdynamics appdynamics   43 May  6 03:54 .
drwxr-xr-x. 8 root        root        4096 May  5 16:56 ..
drwxr-xr-x  3 root        root          30 May  5 16:56 java-agent
drwxr-xr-x  3 root        root          17 May  6 03:54 machine-agent

As I understand it chmod +rx defaults to a+rx - but just not on some of our boxes, and only on RHEL 7.2 (6.8 seems to be fine).

I've never seen this before and googling doesn't seem to give any hints. It's a problem because it breaks existing chef cookbooks, but only for a handful of machines.

tonys
  • 123
  • 5

1 Answers1

1

chmod +rx and chmod a+rx isn't the same thing. The former honors the umask setting (i.e. won't set bits present in umask), while the latter is not. It seems your umask is set to 0077, or something similar.

Lacek
  • 7,233
  • 24
  • 28