June 13, 2016

Lab 35.1 chmod command syntax not working as intended in Centos7

In lab 35.1 it is suggested to try

$ chmod u=+w,g=-w,o=+rw afile

to explore adding permissions to existing ones but the u=+w in simply recognised as u=w. The [ugoa]=-[rwx] syntax removes all permissions, not just the one requested, eg g=-w removes all permission for g leaving them as blank ---

Not sure about in other distributions, only tried in Centos7.

chmod [ugoa]+-[rwoa] works correctly though.

 

Click Here!