Hi Jon, Can you tell me how you solve this at last,I met the same problem in my php script.,I am really new to Linux and Apache.Where and how to set the permission to ensure that all common users can write this file?
Regards Leon -----原始邮件----- 发件人: Jon Farmer [mailto:[EMAIL PROTECTED]] 发送时间: 10, January, 2002 17:08 收件人: PHP General Mailing List 主题: [PHP] weird fopen problem I am getting a the follwing error: Warning: fopen("/home/jon/pgpfiles/sgsdgsdg","w") - Permission denied in /home/ethiorg/public_html/test.php on line 2 Warning: Supplied argument is not a valid File-Handle resource in /home/ethiorg/public_html/test.php on line 3 Warning: Supplied argument is not a valid File-Handle resource in /home/ethiorg/public_html/test.php on line 4 from the following script: <? $file = fopen("/home/jon/pgpfiles/sgsdgsdg","w"); fputs($file, "this is a test\n"); fclose($file); ?> the directory /home/jon/pgpfiles has mode 777 and is owned by nobody and group is nobody. Apache runs under user nobody. Any ideas? -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key -- 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] -- 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]