Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So I have a couple of problems on my server.

WordPress is unable to modify .htaccess, and the same files (exact same files) are running fine on another server.

Me and my friend also tried setting up an imageboard, and downloaded Kusuba X, which was working perfectly until I tried to make a board, and it simply says "Unable to create directory" which I think is done with mkdir();?

So I think there's something wrong with php or apache, don't know which one, but I'd like to fix it.

As I googled a little bit, I found, ran ls -splad /home/myname/ and got

4 drwxr-xr-x 12 myname myname 4096 Dec 12 18:56 /home/myname//

So I readed

it would not work because the directory is owned by root (not apache), and even though it's grouped by apache, the directory isn't group-writeable so that doesn't cut it. In this scenario, you could simply add group write perms (chmod g+w /home/myname/), and you're good to go.

But it didn't work, so I continued on the text

Something else you might see is: 4 drw-r-xr-x 2 apache apache 4096 2010-07-22 20:54 /var/www/blah/ In this case, the ownership is ok, but the directory isn't writeable by its owner. You can fix this by adding write permission for the owner chmod u+w /var/www/blah/

But I was unable to fix it. So what should I do?

share|improve this question
Have you tried creating an empty .htaccess and changing its owner to www-data (the user under which Apache runs) (chown www-data .htaccess) and also give it write access (chmod u+w .htaccess)? – Cristian Ciupitu Dec 12 '12 at 17:45
No, didn't even know that it's possible. But how does it relate to this, as I have existing files and working systems, except these two problems. @CristianCiupitu – user145429 Dec 12 '12 at 20:26
Are the systems 100% identical? Are you running the same distribution on them? Are you using the same Apache version? There's also of the course the option of giving Apache (www-data) the write permission to the directory containing that file, but why give it more than it needs? – Cristian Ciupitu Dec 13 '12 at 0:16
I don't know the systems, because the other host is a popular webhost and my own server is hosted by my friend, and I control only it. How would I give apache the right to write? @CristianCiupitu – user145429 Dec 13 '12 at 6:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.