chmod without modding other user perms

1

I want to chmod a file but I want to do it so it doesn't effect the other "user"/"groups"

e.g. giving the root 0

before 741
chmod 0** [filename]
after 041

or give the group a 7

before 741
chmod *7* [filename]
after 771

anyway to do this?

user461815

Posted 2015-07-13T17:10:14.853

Reputation:

Learn to use chmod symbolic mode Using CHMOD in symbolic mode for more fine grained control

– DavidPostill – 2015-07-13T17:16:38.380

Answers

2

You can use the symbolic representation, which has + and -:

chmod u-rwx         # remove rwx permissions from user

or

chmod g+rwx         # add rwx permissions to group

Simon Richter

Posted 2015-07-13T17:10:14.853

Reputation: 2 384