I want to set my folders permissions to 555 and my files permissions to 554, so I tried the following
sudo chmod -R -v ug=rx,o=r,a+X mydir/
I thought this would set the
group permissions to
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
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.
chmod command doesn't work as I expected it to?