RE: file permissions
06-05-2015, 08:25 PM
(This post was last modified: 06-05-2015, 08:32 PM by erm3nda.
Edit Reason: code formatting
)
I have the same problem with some other panels that i tried on the past.
What i did is to create my own chmod-fix-sentora.sh file with a few lines.
I've attached too for lazy users.
USAGE
fix perms to domain_com and all of subdomains:
fix perms to a subdomain (don't need to suplly tld extension because the regexp * value.) :
fix perms on ALL (because all paths has at least one _ on their names.) :
What i did is to create my own chmod-fix-sentora.sh file with a few lines.
I've attached too for lazy users.
Code:
#!/bin/bash
# basic chmod fix for Sentora www-data folders.
if [ -z $1 ]
then
echo "You must pass at least any word of the path name or put _ to fix ALL domains";
elif [ $1 == "_" ]
then
find /var/sentora/hostdata/zadmin/public_html/* -type d -exec chmod 755 {} \;
find /var/sentora/hostdata/zadmin/public_html/* -type f -exec chmod 644 {} \;
echo "Fixed chmod to ALL domains ";
else
find /var/sentora/hostdata/zadmin/public_html/*$1* -type d -exec chmod 755 {} \;
find /var/sentora/hostdata/zadmin/public_html/*$1* -type f -exec chmod 644 {} \;
echo "Fixed chmod to paths that contains $1";
fi
USAGE
fix perms to domain_com and all of subdomains:
Code:
./chmod-fix-sentora.sh domain_com
fix perms to a subdomain (don't need to suplly tld extension because the regexp * value.) :
Code:
./chmod-fix-sentora.sh sub_domain
fix perms on ALL (because all paths has at least one _ on their names.) :
Code:
./chmod-fix-sentora.sh _