note 28394 added to ref.ftp
| From: | eric at evilwalrus dot com | Date: | Sat, 11 Jan 2003 16:14:27 +0000 |
| Subject: | note 28394 added to ref.ftp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42000@lists.php.net to get a copy of this message | ||
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.
--
http://www.php.net/manual/en/ref.ftp.php
http://master.php.net/manage/user-notes.php?action=edit+28394
http://master.php.net/manage/user-notes.php?action=delete+28394
http://master.php.net/manage/user-notes.php?action=reject+28394