Page 1 of 1

Sites are down, permission issues.

Posted: Sun Jun 24, 2018 8:39 am
by Dane Harper
Hello,

I was trying to create an FTP user on my server with access to all account. But accidentally changed ownership permission for all accounts to dane:dane user. Now all the site are down. Please would you help me asap. Is there any option revert this changes. My server is running with cPanel.

Re: Sites are down, permission issues.

Posted: Sun Jun 24, 2018 8:48 am
by Aaron
Hello Dane,

You can fix the ownership permissions for all the cPanel accounts using this bash script. Please try it.

Create a file with name fileperm.sh

Paste this script

Code: Select all

#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown -Rv $user.$user /home/$user
chown -Rv $user.mail /home/$user/etc
chown -v $user.nobody /home/$user/public_html
done
Save and run

#sh fileperm.sh

Re: Sites are down, permission issues.

Posted: Sun Jun 24, 2018 8:54 am
by Dane Harper
Hello Aaron,

Thanks Aaron, you saved me. This Really saved my life and alot of time! thank you very much. My sites are back online.