-1

I am trying to setup WordPress on CentOs6 for the first time and facing issue with proper file permission. I am using Linode VPS hosting and have chosen centOS6 as my OS.I am able to install WordPress at following location

/var/www/html/wordpress

As per WordPress doc Wordpress folder should have 755 permission.I have cross checked using WinSCP, and folder permission has been set as 755

But still while I am trying to update / create something new inside my WordPress installation, I am getting an error indicating that it is not able to create directory.

I have noticed one more issue, there is an .htaccess file inside wordpress folder and its permission are also 755, but still Wordpress says

If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file.

It seems that there is something wrong with file permission but being new to Linux and its file permissions, I am not sure what is wrong and how it can be fixed

can any one suggest me where I am doing wrong

11
  • 755 only allows the owner of the folder to write in it. Are you the owner ? Try 775 to grant write permissions to the group also Commented Dec 8, 2013 at 14:44
  • @user2196728: even that is not working, only 777 is working as of now :( Commented Dec 8, 2013 at 15:02
  • 777 on file or parent folder, or both ? Commented Dec 8, 2013 at 15:04
  • @user2196728: i tried on the file as of now, but i am sure i will work on folder also Commented Dec 8, 2013 at 15:06
  • What is the owner:group of your wordpress folder ? and what is the group you belongs to ? Commented Dec 8, 2013 at 15:10

1 Answer 1

2

The main problem here is you lack of understanding of the UNIX permissions model and the tools you are using. You should spend some time learning how UNIX file permissions work and and how to manipulate them with chown(1) and chmod(1).

I suspect that some (or all) of the files in /var/www/html... are owned by root and have their group set to root.

The httpd process will be running as user apache. Out of the box the Apache user will not have access to files owned by root:root except through the other triad. You could make the files other writeable but that's generally not a good idea if it can be avoided.

A better solution is to change the ownership of the files and directories so that they are owned by apache and group apache. You can then make the files owner or group writeable.

1
  • @lain: I am fully agree about your point about knowledge regarding unix model.I was doing all work in Window and this is first time I am dealing with Linux and its permission model. Commented Dec 8, 2013 at 17:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.