mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 04:50:47 -07:00
Update v-fix-website-permissions to allow dynamic php file permissions based on user-defined settings
This commit is contained in:
parent
98600537fc
commit
1571d60b2f
1 changed files with 7 additions and 2 deletions
|
@ -73,10 +73,15 @@ find public_html/ -type d -exec chmod 755 {} +
|
||||||
find public_html/ -type f -exec chmod 644 {} +
|
find public_html/ -type f -exec chmod 644 {} +
|
||||||
chown -R $USER:$USER public_html/
|
chown -R $USER:$USER public_html/
|
||||||
|
|
||||||
|
php_chmod="600"
|
||||||
|
if [ -f "/home/$USER/web/$domain/php_chmod" ]; then
|
||||||
|
php_chmod=$(cat /home/$USER/web/$domain/php_chmod)
|
||||||
|
fi
|
||||||
|
|
||||||
# Setting chmod 600 for all php files
|
# Setting chmod 600 for all php files
|
||||||
echo "= Setting chmod 600 for all php files"
|
echo "= Setting chmod 600 for all php files"
|
||||||
find -name "*.php" -type f -exec chmod 600 {} +
|
find -name "*.php" -type f -exec chmod $php_chmod {} +
|
||||||
find -name ".env" -type f -exec chmod 600 {} +
|
find -name ".env" -type f -exec chmod $php_chmod {} +
|
||||||
find -name "*.php" -type f -exec chown $USER:$USER {} +
|
find -name "*.php" -type f -exec chown $USER:$USER {} +
|
||||||
find -name ".env" -type f -exec chown $USER:$USER {} +
|
find -name ".env" -type f -exec chown $USER:$USER {} +
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue