Skip to content

Instantly share code, notes, and snippets.

@pdewouters
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdewouters/f353786df2d2cd1faead to your computer and use it in GitHub Desktop.
Save pdewouters/f353786df2d2cd1faead to your computer and use it in GitHub Desktop.
Unix permissions
var_dump(chmod( $this->path->get_default_path(), 0555 ));
var_dump("owner of the current PHP script " . get_current_user());
print_r(posix_getpwuid(fileowner($this->path->get_default_path())));
var_dump(substr(sprintf('%o', fileperms($this->path->get_default_path())), -4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment