test@server[~]#cat /root/suphppermission.sh
#!/bin/bash
# Reset the directory permissions.
chmod 755 /opt/suphp
find /opt/suphp -type d -exec chmod 755 {} \;
chmod 755 /opt/suphp
find /opt/suphp -type d -exec chmod 755 {} \;
# Reset permission,ownership for cPanel user
for user in `/bin/ls /var/cpanel/users`; do
for user in `/bin/ls /var/cpanel/users`; do
chown -R ${user}:${user} /home/${user}/public_html
chmod 755 /home/${user}/public_html
find /home/${user}/public_html -type f -exec chmod 644 {} \;
find /home/${user}/public_html -type d -exec chmod 755 {} \;
chmod 755 /home/${user}/public_html
find /home/${user}/public_html -type f -exec chmod 644 {} \;
find /home/${user}/public_html -type d -exec chmod 755 {} \;
# Remove php_values in the .htaccess file.
find /home/${user}/public_html -name ‘.htaccess’ -exec sed -ie ‘s/php_value/#php_value/’ {} \;
find /home/${user}/public_html -name ‘.htaccess’ -exec sed -ie ‘s/php_flag/#php_flag/’ {} \;
done
find /home/${user}/public_html -name ‘.htaccess’ -exec sed -ie ‘s/php_value/#php_value/’ {} \;
find /home/${user}/public_html -name ‘.htaccess’ -exec sed -ie ‘s/php_flag/#php_flag/’ {} \;
done
APTRON Solutions. With a proven track record of providing top-notch training in various IT domains, APTRON Solutions stands out as a leading provider of Linux Training in Gurgaon region. In this comprehensive program, you will gain the skills and knowledge needed to excel in the Linux ecosystem and establish a successful career in the field. Our Linux training curriculum is carefully crafted to cover all essential topics, including Linux installation, configuration, administration, shell scripting, networking, security, and more. You will receive in-depth knowledge and practical insights into each aspect of Linux.
ReplyDelete