I want to set my folders permissions to 555 and my files permissions to 554, so I tried the following chmod
:
sudo chmod -R -v ug=rx,o=r,a+X mydir/
I thought this would set the user
and group
permissions to r-x
and others
permission to r--
, but since there is an a+X
only folders would receive an r-x
for the others
permission, but files would remain r--
.
But this isn't working and it is setting all the files and folders to 555, even if I set all folders and files to 444 before to assure there isn't any x
permission anywhere.
Why this chmod
command doesn't work as I expected it to?