fopen() and persmissions
| From: | Christian Dechery | Date: | Fri, 11 May 2001 01:42:10 +0000 |
| Subject: | fopen() and persmissions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-52377@lists.php.net to get a copy of this message | ||
as I've seen PHP running as Apache module cannot create or update files...
it gives me 'permission denied'...
so I've tried these solutions:
* fopen("ftp://user:password@myftpserver.com/directory/newfile.ext","w");
this actually works... but only for "w"... if I wanna update this file, like "a", it can't be done as it says the file already exists... so I'd have to read it entirely, add the new data and write it back... (not so good)....
* chmod 777 in the dir I am... so 'nobody' (apache user) can write to it... but what happens is that, the file isn't mine... it belongs to nobody... so I have no rights to it in FTP or telnet...
is there a better solution then either of these two???
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer