MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //scripts.20110601.041516.15411/chownpublichtmls
#!/usr/bin/perl
# cpanel - chownpublichtmls                       Copyright(c) 2010 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

BEGIN { unshift @INC, '/usr/local/cpanel'; }

require '/scripts/safetybits.pl';

while ( @PW = getpwent() ) {
    if ( -d "$PW[7]/public_html" && -e "/var/cpanel/users/$PW[0]" ) {
        print "Chowning $PW[0]....";
        safe_recchown( $PW[2], $PW[3], "$PW[7]/public_html" );
        print "Done\n";
    }

}

if ( -e '/var/cpanel/fileprotect' ) {
    exec '/scripts/enablefileprotect';
}
else {
    exec '/scripts/disablefileprotect';
}