-
-
Save nicolasguzca/fceab802f03d472f16f75e50052d3080 to your computer and use it in GitHub Desktop.
Fix user permissions to vesta control panel
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 | |
cd /home/ | |
for i in `ls | grep -v 'lost+found'`; do | |
if id "$i" &>/dev/null ; then | |
chattr -i /home/$i/conf | |
chown -R ${i}:${i} $i | |
chown root:root /home/$i/conf | |
chown root:root /home/$i/conf/* | |
chown root:bind /home/$i/conf/dns/* &>/dev/null | |
chown Debian-exim:mail /home/$i/conf/mail/* &>/dev/null | |
chown dovecot:mail /home/$i/conf/mail/*/passwd &>/dev/null | |
chown root:$i /home/$i/conf/web/* &>/dev/null | |
chattr +i /home/$i/conf | |
echo $i done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment