Difference between using "chmod a+x" and "chmod 755"

user2579439 picture user2579439 · Sep 3, 2013 · Viewed 155.6k times · Source

This may sound silly, but I have a file/ script that need to run and in order to do it I must change it to become executable. I would want to use either chmod a+x or chmod 755. But is there a difference between using chmod a+x and chmod 755?

Answer

filmor picture filmor · Sep 3, 2013

chmod a+x modifies the argument's mode while chmod 755 sets it. Try both variants on something that has full or no permissions and you will notice the difference.