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!
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
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?
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.
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.
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
Guest xaav Posted January 10, 2012 Posted January 10, 2012 Put this in your conf file: local_umask = 755 anon_umask = 755
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
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?
Guest xaav Posted January 10, 2012 Posted January 10, 2012 /etc/vsftpd.conf Then, run /etc/init.d/vsftpd restart
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!
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
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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now