On Thu, May 10, 2001 at 10:42:10PM -0300, Christian Dechery wrote:
> 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:[EMAIL PROTECTED]/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)....
This is completely expected behavior as your are using ftp. Since it is
a file transfer protocol, you can't do much other than transfer files
and browse directories.
> * 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...
I would never make a file chmod 777. That seems to dangerous to me. I
think you could add yourself to the same group that nobody belongs to
and then you could edit the file if it is chmod 666 or something like
that. I'm not a Linux expert by any means, so there is probably an even
more secure way.
> is there a better solution then either of these two???
Not that I'm aware of. I would probably use the 2nd method.
--
Jason Stechschulte
[EMAIL PROTECTED]
--
I suppose one could claim that an undocumented feature has no
semantics. :-(
-- Larry Wall in <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]