mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
v-fix-website-permissions: exclude specific file types from permission changes to avoid altering 'Change' file attribute
This commit is contained in:
parent
b88f0e56bf
commit
29f030205e
1 changed files with 3 additions and 4 deletions
|
@ -69,8 +69,8 @@ fi
|
||||||
|
|
||||||
|
|
||||||
echo "Updating permissions for /home/$USER/web/$domain/public_html/"
|
echo "Updating permissions for /home/$USER/web/$domain/public_html/"
|
||||||
find public_html/ -type d ! -perm 755 -exec chmod 755 {} +
|
find public_html/ -type d ! \( -name "*.php" -o -name "*.env" \) ! -perm 755 -exec chmod 755 {} +
|
||||||
find public_html/ -type f ! -perm 644 -exec chmod 644 {} +
|
find public_html/ -type f ! \( -name "*.php" -o -name "*.env" \) ! -perm 644 -exec chmod 644 {} +
|
||||||
find public_html/ ! -user $USER -exec chown $USER:$USER {} +
|
find public_html/ ! -user $USER -exec chown $USER:$USER {} +
|
||||||
|
|
||||||
php_chmod="600"
|
php_chmod="600"
|
||||||
|
@ -80,8 +80,7 @@ fi
|
||||||
|
|
||||||
# Setting chmod 600 for all php files
|
# Setting chmod 600 for all php files
|
||||||
echo "= Setting chmod $php_chmod for all php files"
|
echo "= Setting chmod $php_chmod for all php files"
|
||||||
find -name "*.php" -type f ! -perm $php_chmod -exec chmod $php_chmod {} +
|
find -type f \( -name "*.php" -o -name "*.env" \) ! -perm $php_chmod -exec chmod $php_chmod {} +
|
||||||
find -name ".env" -type f ! -perm $php_chmod -exec chmod $php_chmod {} +
|
|
||||||
find -name "*.php" -type f ! -user $USER -exec chown $USER:$USER {} +
|
find -name "*.php" -type f ! -user $USER -exec chown $USER:$USER {} +
|
||||||
find -name ".env" -type f ! -user $USER -exec chown $USER:$USER {} +
|
find -name ".env" -type f ! -user $USER -exec chown $USER:$USER {} +
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue