Sites are down, permission issues.

Discussions related with hosting control panels used, which include cPanel, Plesk, Directadmin etc..

Moderator: Staff

Post Reply
Dane Harper
Posts: 0
Joined: Sun Jun 24, 2018 8:29 am

Sites are down, permission issues.

Post 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.


Aaron
Posts: 17
Joined: Mon Apr 11, 2016 8:59 am

Re: Sites are down, permission issues.

Post 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


Aaron N
Linux Support Engineer.
Nixtree Solutions LLP
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php

Follow us on : https://twitter.com/nixtree
Dane Harper
Posts: 0
Joined: Sun Jun 24, 2018 8:29 am

Re: Sites are down, permission issues.

Post 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.


If you are looking for assistance in server management, please get in touch with our support.
Post Reply