Ice IT Support Posted January 9, 2012 Posted January 9, 2012 Hello,I am running a test Ubuntu linux server with Apache2, PHP5 and MySQL. When I run a PHP mail() function to my personal email, it returns this error:Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/wheeler_jonathon/public_html/mail.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0I read that my ISP might be filtering port 25, and I will work to disable this and see if that changes anything. Other helpful things to know:-I'm not using PHP pear (I'm not sure it it is installed, however. It shouldn't be)-My httpd.conf is blank (would that affect anything?)-I am completely comfortable with using the terminal (That is how I got this thing running anyway ) Thank you to anyone who can help! Quote
soerganda Posted January 9, 2012 Posted January 9, 2012 It looks like your problem is permissions related.Make sure all files and directories have these permissions and ownerships.Directories: 755Files: 644 Hopefull help Quote
Ice IT Support Posted January 9, 2012 Author Posted January 9, 2012 Thanks, it works! I can't believe I didn't think of that. But how do you set it so that newly created directories default to 755 and newly created/uploaded files default to 644? Quote
Byron Posted January 9, 2012 Posted January 9, 2012 It's already set up by default to chmod directories to 755 and files to 644. Quote
Ice IT Support Posted January 10, 2012 Author Posted January 10, 2012 No, default for files is 600 and folders is 700. I forgot to mention I am using vsftpd. What does HelioHost use? I checked /etc/vsftpd.conf for options, but found nothing. Also, FileZilla displays file/folder permissions as -rw------ instead of numbers. Quote
Byron Posted January 10, 2012 Posted January 10, 2012 cPanel's default are 755 & 644. 755 = rwxr-xr-x644 = rw-r--r-- http://byrondallas.heliohost.org/tools/chmod_calculator-string.html Quote
Guest xaav Posted January 10, 2012 Posted January 10, 2012 Put this in your conf file: local_umask = 755 anon_umask = 755 Quote
soerganda Posted January 10, 2012 Posted January 10, 2012 cPanel's default are 755 & 644.others ? just optionall. Glad your problem got solved! #heliohost staff wannabe# :D Quote
Ice IT Support Posted January 10, 2012 Author Posted January 10, 2012 Put this in your conf file: local_umask = 755 anon_umask = 755 Which file? /etc/vsftpd.conf or httpd.conf? Quote
Guest xaav Posted January 10, 2012 Posted January 10, 2012 /etc/vsftpd.conf Then, run /etc/init.d/vsftpd restart Quote
Ice IT Support Posted January 10, 2012 Author Posted January 10, 2012 After doing that nothing funcioned at all, so I purged vsftpd and installed pure-ftpd (what I believe HelioHost is using). The problem seems to have resolved itself now (the mail problem as well). Thank you so much everyone for your help! Quote
Byron Posted January 10, 2012 Posted January 10, 2012 Your right. heliohost uses pure ftpd. I'm sorry I didn't know that was what you were asking in your previous post. http://byrondallas.heliohost.org/helio/cgi-bin/ftp_stevie.cgi Quote
Ice IT Support Posted January 10, 2012 Author Posted January 10, 2012 That's ok. It was a silly question anyway since I can easily look in my FTP messages and find it there. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.