Correct ownership of all accounts in cPanel
Accidentally changed the ownership of all accounts in cPanel? Here is a simple script which helps you to correct the ownership of all accounts. This script is intended for cPanel servers only. Furthermore, it is highly recommended that you run a full backup of your server before running this or any other script that makes changes to multiple files.First, you need to create a script file, say “permission. sh”
vim permission.sh
Add the following script to that file.
#!/bin/bash cd /var/cpanel/users for user in * do chown -Rv $user.mail /home/$user/etc chown -v $user.nobody /home/$user/public_html chown -Rv $user.$user /home/$user done
Give excecution permission
chmod +x permission.sh
Run the script
sh permission.sh
That’s it!
Read More:
- How to Install ClassicMenu Indicator on Ubuntu
- Enable DKIM and SPF for all accounts in cPanel
- Maiman not starting in cPanel server
- How to Install Python 3 in cPanel Server
- Disable Outgoing email of a cPanel Account
- Softaculous Showing Blank Page in cPanel WHM
- How to increase tmp directory size in cPanel
- How to Combine Apache Access Logs in cPanel
- /usr/local/cpanel/bin/jailshell: /usr/bin/wget: Permission denied
- No response from subprocess /usr/local/cpanel/whostmgr/docroot/cgi/addon_nginx.cgi
- Disable 2 factor authentication via command line in cPanel
- Create FTP account in cPanel via terminal
- Softaculous Showing Blank Page in cPanel WHM
- How to Clear VirtFS on cPanel Server
- How to change outgoing mail server IP in cPanel
- How to change cPanel password from command line
- The list of default open ports in cPanel Server
- Install Site pro Website Builder on cPanel
- Install wkhtmltopdf on cPanel or CentOS
- How to Setup Alternate SMTP Port in cPanel
If you like the post “Correct the ownership of all accounts in cPanel” and wish to receive more articles from us, please like our FB page: If you like this post and wish to receive more articles from us, please like our FB page: Button
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
Add Comment