0byt3m1n1
Path:
/
data
/
51
/
2
/
82
/
137
/
2408789.shuffle
/
user
/
2641263
/
htdocs
/
[
Home
]
File: wp-sharedhost-permissions.php
<?php ## Function to set file permissions to 0644 and folder permissions to 0755 function AllDirChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ){ $d = new RecursiveDirectoryIterator( $dir ); foreach( new RecursiveIteratorIterator( $d, 1 ) as $path ){ if( $path->isDir() ) chmod( $path, $dirModes ); else if( is_file( $path ) ) chmod( $path, $fileModes ); } } echo "----------------------- CLEANUP START -------------------------<br/>"; $start = (float) array_sum(explode(' ',microtime())); echo "<br/>*************** SETTING PERMISSIONS ***************<br/>"; echo "Setting all folder permissions to 755<br/>"; echo "Setting all file permissions to 644<br/>"; AllDirChmod( "." ); echo "Setting wp-config.php to 600<br/>"; chmod("wp-config.php", 0600); $end = (float) array_sum(explode(' ',microtime())); echo "<br/>------------------- CLEANUP COMPLETED in:". sprintf("%.4f", ($end-$start))." seconds ------------------<br/>"; ?>