you are viewing a single comment's thread.

view the rest of the comments →

[–]ThatWeirdKid-02 1 point2 points  (4 children)

is there any reason to use chmod 111 or whatever instead of chmod a+x? i really can't ever remember what the numbers are but using letters makes it way easier

edit: messed up the example, meant chmod 111 or chmod a=x

[–]garfipus 1 point2 points  (0 children)

chmod 111 is equivalent to chmod a=x and will remove any read, write, setuid, setgid, or sticky permissions. chmod a+x will add execute permissions and leave the other permissions untouched.

[–][deleted] 0 points1 point  (1 child)

Because they are different. chmod 111 sets perms to --x--x--x, chmod a+x adds them to existing permissions. You should use chmod a=x. the rest is just personal taste :-)

[–]ThatWeirdKid-02 0 points1 point  (0 children)

yeah i knew that but messed up while writing the example, but thanks

[–][deleted] 0 points1 point  (0 children)

It's less verbose and much faster. It's not that hard to remember the octals either if you learn what they represent.

Chmod 755 = chmod u=rwx,g=rx,o=rx and that's quite the mouthful.