Re: Changing directory permissions???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Philip Hallstrom wrote:

The key word is "directory"

chmod only works for files

PHP5 has a ftp_chmod; but not 4.3.x


It works on directories for me...

% php -v
PHP 4.3.4 (cli) (built: Jul 19 2004 14:52:27)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
% mkdir d
% ll -d d
drwxr-xr-x  2 philip  philip  512 Jul 11 12:21 d/
% php
<?php chmod("d", 0777); ?>
% ll -d d
drwxrwxrwx  2 philip  philip  512 Jul 11 12:21 d/

-philip



Philip Hallstrom wrote:

Is there a way to change directory permissions with pre php5.0? Linux/Apache

I'm designing a CM application and would like my code to enable non-techies to be able to create a simple text file. [e.g., directory temporarilly from 755 to 757 and then back again.]

PHP5.0 has a chmod; but not, 4.3.x



Huh?  chmod has been around since V3...

http://us2.php.net/chmod

chmod
(PHP 3, PHP 4, PHP 5)
chmod -- Changes file mode


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


That is because your php code made the directory and is therefore the owner.

My directory already exists and was made by ftp.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux