Browsing all articles tagged with suphp
Сен
20
Комментарии отключены

suPHP и исправление ошибок с правами доступа

После установки suPHP появилось много ошибок с правами доступа. Bash скрипт для исправления этих ошибок:


if [ -z "$1" ]
then
echo "use: change.perms cpanel_user";
exit;
fi

HomeDirectories[0]=»/home/$1″
# HomeDirectories[1]=»/home2/$1″
# HomeDirectories[2]=»/home3/$1″

export IFS=$’\n’

for x in ${HomeDirectories[@]}
do
if [ -h "$x" ]; then
echo «Leaving $x because is symlink…»
else
z=»$x/public_html»
for i in $( find $z -type d )
do
if [ "$z" != "$i" ]
then
chmod -c 755 $i
chown -c $1:$1 $i
fi
done

for i in $( find $z -type f )
do
chmod -c 644 $i
chown -c $1:$1 $i
done

for i in $( find $z -type f |grep configure.php)
do
chmod -c 444 $i
done
for i in $( find $z -type f |grep configuration.php)
do
chmod -c 444 $i
done
fi
done
echo «Done.»

Рубрики

Метки

777 addon Apache apf bash cpanel Cpanel / WHM Dedicated Server default DNS encryption exim fantastico firewall FreeBSD hosting install iptables kernel Linux mysql named openssl pgp PHP plugin script scripts secure Security server sh spamassassin ssl whm zend защита книги обзор порты почта сервер фаервол хостинг шифрование

Свежие записи

Архивы

Мета

Счетчики