Skip to content

Instantly share code, notes, and snippets.

@rpherrera
Created March 10, 2018 16:02
Show Gist options
  • Save rpherrera/0bc966a1ce5af7d0868bb2599374b4c7 to your computer and use it in GitHub Desktop.
Save rpherrera/0bc966a1ce5af7d0868bb2599374b4c7 to your computer and use it in GitHub Desktop.
Changes the permissions from all: { directories beneath current directory to ug=rwx,o=rx (755 mode) | files beneath current directory to ug=rw,o=r (664 mode) }
#!/bin/bash
# Changes the permissions from all directories beneath current directory to ug=rwx,o=rx (755 mode)
find . -type d -exec chmod 775 {} \;
# Changes the permissions from all files beneath current directory to ug=rw,o=r (664 mode)
find . -type f -exec chmod 664 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment