Created
November 5, 2013 18:42
-
-
Save Xarkam/7323900 to your computer and use it in GitHub Desktop.
Check folder and sub folder to adapt permissions
This file contains hidden or 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
#!/bin/bash | |
for file in `find . ` | |
do | |
permissions=`stat -c %a $file` | |
if [ $permissions = "660" ] | |
then | |
permissions=664 | |
echo "Permission 660 trouvée" | |
else | |
permissions=775 | |
echo "Permission 770 trouvée" | |
fi | |
#echo $permissions $file | |
chmod $permissions $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment