note 25676 rejected from function.chmod by spic

From: Date: Wed, 02 Oct 2002 09:30:24 +0000
Subject: note 25676 rejected from function.chmod by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-37522@lists.php.net to get a copy of this message
I set my directory's sticky bit on, perform a task, and then unset the sticky bit. My directory's regular permissions are 701. On the command line (Open BSD 3.0) I would go chmod 1701 /path/to/dir to turn sticky on, and then chmod 0701 /path/to/dir later to turn it off. I got this working in PHP by going chmod('/path/to/dir',octdec(1701)) and then chmod('/path/to/dir/',octdec(701)) later. Notice that I specified 701 rather than 0701 in the second call. I got strange permission errors when I did chmod(...,octdec(0701)). Although there is perhaps something there I don't understand

« previous php.notes (#37522) next »