7 examples for chmod
# allow only root access to a particular folder. Useful for hiding your pr0n and any other files you don't want anyone else to see. sudo chmod -R 700 secret_folder
# Give everyone read, write and execute access to folder 'foo' and all its contents chmod -R 777 foo
# Let rvm install gems without sudo. # allow your (u)ser to (w)rite and e(x)ecute things in the /Library/Ruby directory, and (-R)ecursively below it chmod -R u+wx /Library/Ruby
# Give everyone read and execute access to folder 'foo' and all its contents chmod -R 555 foo
# Recursively set All users with permissions to read files and execute directories. # If the object is a directory the Executable Bit is added for all users: dr-xr-xr-x. # If a file has an executable bit, execute is granted for All users: -r-xr-xr-x. # If the file did not have an executable bit set, no executable bits are modified: -r--r--r--. chmod -R a=rX testdir/