LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-13-2006, 02:06 PM   #1
louse101
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Rep: Reputation: 0
Unhappy 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.
 
Old 11-13-2006, 02:16 PM   #2
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Rep: Reputation: 72
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.
 
Old 11-13-2006, 02:29 PM   #3
louse101
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 11-13-2006, 02:43 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 11-13-2006, 03:12 PM   #5
louse101
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you. I tried just that but no joy.
 
Old 11-15-2006, 05:20 AM   #6
louse101
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Can anyone else help me with this problem? I'm desperate.
 
Old 11-16-2006, 10:45 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 11-16-2006, 02:09 PM   #8
louse101
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
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.

Last edited by louse101; 11-16-2006 at 02:14 PM.
 
Old 11-18-2006, 03:12 PM   #9
louse101
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Does this help?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring Fedora Core 5 on a Dedicated Server toLa` Linux - Newbie 2 06-30-2006 03:51 PM
Dedicated Server Distros (SME server and Censornet) Sugga Linux - General 2 09-22-2005 03:15 AM
qmail on dedicated server fuelinjection Linux - General 1 07-04-2005 03:56 PM
Getting my first dedicated server Damainman Linux - Newbie 4 11-13-2003 04:48 PM
where to get UT dedicated server dkc_ace Linux - General 2 12-19-2002 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration