Question re: wordpress functionality - permissions/ownership
I'm a newbie. Just set up my first server (LAMP on Ubuntu 10.04 Linode 1024). I have everything running almost perfectly. Except that on my wordpress site, I'm not able to troubleshoot two problems:
1. User registration: it works (user is created) but no emails are sent to new user or admin. User has no way of knowing their password. I've set up a google apps account with an email address for the domain and the email account works fine. Is there a server setup issue with PHP mail handling? What should I look for? Another possible problem is that permissions have been giving me a headache. I'm not used to setting chmod for everything (I'm coming from a shared server and maybe that's where I still belong). Does anyone have any helpful tips on setting permissions correctly? I'm using WinSCP to transfer files and unless I'm logged on as root (which I know I shouldn't) I get permissions errors when I try and write or modify files. Sometimes it writes them, but warns of some permissions error, sometimes it won't allow the copy. I've been setting everything at 755 and the folders are all owned by www-data and the group is set as the sudo user that I'm using for FTP. This is for all folders "public" and below.
2. I'm using Cforms plugin for wordpress. Can't get captcha to show up and can't get redirect to success page to work. I've been through all the potential issues with the abspath.php and the cforms.js files, etc. Files do upload to the folder on the server, but again…emails are never sent for any confirmation (not to admin or to user).
Any help or suggestions on things to look for would be greatly appreciated. If I can't get this figured out then sadly I'll have to scrap this experience of server freedom and go back to shared hosting.
Thanks!
2 Replies
web server error logs and mail.log may point to the problem with your mail issues.
That page was very helpful.
From that page: "All files should be owned by your user account, and should be writable by you. Any file that needs write access from WordPress should be group-owned by the user account used by the web server."
when I'm setting chown for the blog files, I'm wondering what the correct relationship should be…(assume my sudo user is "jake")
$ sudo chown -R jake:www-data /home/jake/…/blogfolder/ <--- I think this one is correct, right?
Other options:
$ sudo chown -R www-data:www-data /home/jake/…/blogfolder/
$ sudo chown -R www-data:jake /home/jake/…/blogfolder/