mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-22 06:14:19 -07:00
Create v-fix-websites-permissions
The function fixes chmod and ownership permissions for all websites
This commit is contained in:
parent
4baf5ebc2c
commit
811fdce80f
1 changed files with 18 additions and 0 deletions
18
bin/v-fix-websites-permissions
Normal file
18
bin/v-fix-websites-permissions
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# info: CHMOD & Ownership FIX
|
||||
# options: NO OPTIONS
|
||||
#
|
||||
# The function fixes chmod and ownership permissions for all websites
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
for i in `$VESTA/bin/v-list-sys-users | awk '{if(NR>2)print}'`; do
|
||||
find /home/$i/web/ -name 'public_html' -type d -print0 | xargs -0 -I {} find '{}' -type f -print0 | xargs -0 -I {} chmod 0644 {};
|
||||
find /home/$i/web/ -name 'public_html' -type d -print0 | xargs -0 -I {} find '{}' -type f -print0 | xargs -0 -I {} chown $i:$i {};
|
||||
|
||||
find /home/$i/web/ -name 'public_html' -type d -print0 | xargs -0 -I {} find '{}' -type d -print0 | xargs -0 -I {} chmod 0755 {};
|
||||
find /home/$i/web/ -name 'public_html' -type d -print0 | xargs -0 -I {} find '{}' -type d -print0 | xargs -0 -I {} chown $i:$i {};
|
||||
|
||||
echo "All Done."
|
||||
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue