0

As an addition to my previous question: Which is more widely used: chmod 777 or chmod a+rwx.

If I were to use the chmod a+rwx (which I wouldn't in the real world) format, but I wanted to use the alphanumeric value of 755.

How would I write that out?

e.g.:

$ chmod u+rwx,g+rx,o+rx

That just seems such a long expression.

2
  • this seems to work perfectly fine ? have you tried it ?
    – Archemar
    Sep 4, 2014 at 10:16
  • @Archemar, no I haven't, as it was part of the question. But surely there is shorter way to write it?
    – Kevdog777
    Sep 4, 2014 at 10:25

1 Answer 1

2

You can do all the users' r and x permissions use a+rx and then you'll just need to add u+w for the owner's permissions to grant write access.

$ chmod a+rx,u+w ...

This will grant r and x to every one, and just u+w to the owner.

1
  • OK that is an easier way to write it. Thanks.
    – Kevdog777
    Sep 4, 2014 at 10:32

You must log in to answer this question.

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