Skip to content

Commit

Permalink
chown
Browse files Browse the repository at this point in the history
  • Loading branch information
tlevine committed Apr 11, 2013
0 parents commit ca2a51a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions chown.php
@@ -0,0 +1,22 @@

<?php

if ($handle = opendir('/path/to/files')) {
while (false !== ("ntry = readdir($handle))) {
echo "$entry\n";
}
closedir($handle);
}

// File name and username to use
// $file_name= "foo.php";
// $path = "/home/sites/php.net/public_html/sandbox/" . $file_name ;
// $user_name = "root";
//
// // Set the user
// chown($path, $user_name);
//
// // Check the result
// $stat = stat($path);
// print_r(posix_getpwuid($stat['uid']));
?>
2 changes: 2 additions & 0 deletions readme.md
@@ -0,0 +1,2 @@
Some helpful things for
[NearlyFreeSpeech.NET](https://nearlyfreespeech.net)

0 comments on commit ca2a51a

Please sign in to comment.