note 31383 added to function.chmod
| From: | pmichaud at pobox dot com | Date: | Sat, 19 Apr 2003 20:45:42 +0000 |
| Subject: | note 31383 added to function.chmod | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46821@lists.php.net to get a copy of this message | ||
In the previous post, stickybit avenger writes:
Just a little hint. I was once adwised to set the 'sticky bit', i.e. use 1777 as
chmod-value...
Note that in order to set the sticky bit on a file one must use '01777' (oct) and not
'1777' (dec) as the parameter to chmod:
chmod("file",01777); // correct
chmod("file",1777); // incorrect, same as chmod("file",01023), causing
no owner permissions!
Rule of thumb: always prefix octal mode values with a zero.
--
http://www.php.net/manual/en/function.chmod.php
http://master.php.net/manage/user-notes.php?action=edit+31383
http://master.php.net/manage/user-notes.php?action=delete+31383
http://master.php.net/manage/user-notes.php?action=reject+31383