Last active
September 12, 2017 06:05
-
-
Save inetbiz/bf77315014cb8a407f39 to your computer and use it in GitHub Desktop.
cPanel user nobody chown to cp user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to fix permissions of cpanel nobody file and folders | |
# Written by: Denver Prophit Jr. 03/13/2015 | |
# https://www.strikehawk.com | |
for user in `ls -A /var/cpanel/users` | |
do | |
HOMEDIR=$(egrep "^${user}:" /etc/passwd | cut -d: -f6) | |
find $HOMEDIR ! -user $USER -exec chown $USER {} \; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment