note 28394 deleted from ref.ftp by didou
| From: | didou@php.net | Date: | Sun, 16 Jan 2005 05:15:36 +0000 |
| Subject: | note 28394 deleted from ref.ftp by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83366@lists.php.net to get a copy of this message | ||
Note Submitter: eric at evilwalrus dot com
----
There is no FTP command for the CHMODing of files, so you really have to do it manually using
ftp_exec(). I havn't tried this myself but I'm assuming it should work, but here is an
example of what I would do.
//After we have connected to the FTP server
//and need to set the perms for a file/dir, use
//this command
if (ftp_exec($ftp_conn, 'chmod 0666 logs/log.txt'))
echo 'Successfully set permissions for logs/log.txt to 0666';
else
echo 'Failed to set permissions for logs/log.txt';
Again, I have not tested this, but I assume it would work. Hope that helps.