Re: File Copy
| From: | M. Sokolewicz | Date: | Wed, 20 Oct 2004 09:06:33 +0000 |
| Subject: | Re: File Copy | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199857@lists.php.net to get a copy of this message | ||
how about setting the correct umask. Or else su'ing to the correct user before moving it.
Aidal wrote:
ftp_chmod() is part of PHP 5 and I'm working with PHP 4.3.1. I tried the ftp_raw('CHMOD 777 filename.jpg'); doesn't work either though :( "Silvio Porcellana" <sporc@tin.it> wrote in message news:41761F4A.4050206@tin.it...Aidal wrote:locationHi NG. I'm experiencing some problems when trying to copy a file from onedir2/subdir2/some_new_image_name.jpgto another on the web server. example: dir1/subdir1/some_image_name.jpg -->ofWhen I do this the file permissions changes and I'm no longer the ownerwork,the file. I tried to use chmod('the_new_file', 0777); but it doesn'townerbecause chmod() wont let me change the permissions since I'm not theof this new file.The owner should now be the user the Web server is running as. To change file ownerships you need to use the PHP FTP functions. Check out these pages: http://php.libero.it/manual/en/ref.ftp.php HTH, cheers! Silvio Porcellana