2

I have list of file with permission -rw-r-----. I want modify this permission and give access to other. i.e

-rw-r--rw-

Without modifying current permission setting, just add permission to 'other' user.

2 Answers 2

3
chmod o+rw yourfile

For other add (+) read and write permissions. I think it's quite semantically meaningful.

Alternatively, you could learn the numeric notation. R is worth 4, W is worth 2 and X is worth 1. If you want read and write, for example, you add 4 and 2 together giving 6.

So to keep the permissions the same for owner (6) and group (4) you could do:

chmod 646 yourfile
1

To add rw permissions use:

chmod o+rw <filemame>

To remove w for other:

chmod o-w <filename>

Likewise for group:

chmod g+rw <filename>

And for owner:

chmod u+rw <filename>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .