By Manamarak on
The problem: I am able to access my site and the site is able to access the database, but there seems to be a problem with file access. All file uploads seems to fail, boost, image cache, etc. The file folder exists and is in the right place, and if I set permissions to 777, all is fine, but if I set to 755, everything fails.
Background: I have just moved the site from a shared host to a VPS and am out of my depth with the VPS, did I do something wrong when creating the user? The VPS is using Cpanel and WHM.
Any help will be deeply appreciated.
Comments
777 and 755 arent the only
777 and 755 arent the only option in the world man.
try 765, 666 etc.
777 means that anyone from anywhere in the world can read, write and execute, and alot of hosts just wont put up with too much of that on shared servers.
I just use FileZilla to set the permissions, it's alot easier if you ask me.
Also, where is the 'files' folder?
Files directory needs to be owned by apache user
I've encountered this problem before when moving sites from one box to another. Often the files directory and all of its contents will be created as the ftp user and they need to be owned by the apache user. For example my site files are all owned by the user ftp and the files directory and all it's contents are owned by www-data. 755 permission should be fine on the files directory but it sounds like an ownership issue. My advice would be to:
- Find out your apache user (i'll presume www-data)
- Hop on to ssh and navigate to your sites/default directory
- run the command "chown www-data:www-data files -R"
That will change ownership of the files directory and all it's contents to www-data. Hit the file settings page (admin/settings/file-system) and check your settings there.
Hope this helps
Reece
Reece, you're a genius. Thank
Reece, you're a genius. Thank you.