Created
April 9, 2020 22:06
-
-
Save gwojtak/24d51ce34a074951f6cc8749dbe0142b to your computer and use it in GitHub Desktop.
Enforce Permissions on a directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inotifywait -mrq -e CREATE --format %w%f "$1" | while read FILE | |
do | |
[[ -d "${FILE}" ]] && chmod 2775 "${FILE}" | |
[[ -f "${FILE}" ]] && chmod 0664 "${FILE}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment