LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Fedora 4 dedicated server / Wordpress (https://www.linuxquestions.org/questions/linux-server-73/fedora-4-dedicated-server-wordpress-501231/)

louse101 11-13-2006 02:06 PM

Fedora 4 dedicated server / Wordpress
 
Hi,

I'm having a great time using one of my Linux dedicated servers, but I've run into a backbreaker of a problem.

The website on this server uses Wordpress, but for some reason Wordpress can't write to any files or directorys on the server. All folder permissions are 755. Using 777 works, but leaves me open to obvious security risks.

I thought that maybe it was to do with ownership or similar, so I've used SSH and CHOWN to make sure the domain is set to the correct permissions, which they are.

All I can think of is that the problem is something to do with permissions. 777 works but 755 doesn't. This indicates that the site isn't recognising itself as the owner?

I've had such a great experience with Linux thusfar, but this problem is so odd that it's tainting an otherwise flawless record.

I hope someone can offer any advice, no matter how small. Anything to help me with this problem would be hugely appreciated. Thanks in advance.

mpapet 11-13-2006 02:16 PM

ls -l, chown, chgrp
 
use "ls -l \path\to\dir" to check who owns the files in question.

Make sure the owner is the same one running wordpress.

Use chown to change the owner of the file. use chgrp to change the group so that both are running on the same user/owner.

Be mindful of the implications of changing owner/groups before you start chowning away.


Michael
Quote:

Originally Posted by louse101
Hi,

I'm having a great time using one of my Linux dedicated servers, but I've run into a backbreaker of a problem.

The website on this server uses Wordpress, but for some reason Wordpress can't write to any files or directorys on the server. All folder permissions are 755. Using 777 works, but leaves me open to obvious security risks.

I thought that maybe it was to do with ownership or similar, so I've used SSH and CHOWN to make sure the domain is set to the correct permissions, which they are.

All I can think of is that the problem is something to do with permissions. 777 works but 755 doesn't. This indicates that the site isn't recognising itself as the owner?

I've had such a great experience with Linux thusfar, but this problem is so odd that it's tainting an otherwise flawless record.

I hope someone can offer any advice, no matter how small. Anything to help me with this problem would be hugely appreciated. Thanks in advance.


louse101 11-13-2006 02:29 PM

Thank you Michael. I ran the command but as expected, the owner and group are identical throughout the domain's directories. Only in the ROOT of the server are the owners and groups different (set to root).

Any suggestions? This is the first time I've ever run into a problem like this.

trickykid 11-13-2006 02:43 PM

Some notes from Wordpress on permissions: http://codex.wordpress.org/Changing_File_Permissions

In some cases, when I encounter issues where directories need to be writeable but fail cause they are owned by the user who install or resides in the users home directory, changing from 755 to 777 is bad in some cases, in other situations, you can sometimes get away with changing the permissions to 775 and have the group ownership set to whatever apache runs as, which would be the user attempting to access the files that are not writeable on a group level.

Say for instance, I have a directory that is 755 that is owned by me and set to my own group. The application running needs write access to this directory but thru the web interface it's running as nobody for apache. I would need to set the group ownership as nobody and change it to 775 in order to allow nobody to have write access to this directory. In this case, nobody usually is an account that you can't login with, so it's more secure than allowing with a permission of 777.

If you're still concerned with changing the permissions, you should submit your concerns to Wordpress to see if they can't create a workaround with their software. Perhaps in such cases, these directories that need full access should be treated like /tmp directories, where usually anyone has full access.

louse101 11-13-2006 03:12 PM

Thank you. I tried just that but no joy. :(

louse101 11-15-2006 05:20 AM

Can anyone else help me with this problem? I'm desperate.

trickykid 11-16-2006 10:45 AM

Quote:

Originally Posted by louse101
Thank you. I tried just that but no joy. :(

So full access doesn't work either? Like the Wordpress docs say, in some cases chmod 777 is necessary to get it working.

Perhaps if you shared the directory it needs to write to, the permissions of that directory and the user that apache runs under, we could be of more help.

louse101 11-16-2006 02:09 PM

Ok, thanks TrickyKid.

The dir the program needs to write to is:

http:// www. techsmessage. com /wp-content/uploads
(ROOT/home/techsmessage/public_html/wp-content/uploads)

Permissions of all dirs are 755, with files set to 644. Apache runs under the 'apache' username and group.

louse101 11-18-2006 03:12 PM

Does this help?


All times are GMT -5. The time now is 05:24 AM.