Apache2: UserDir and permission. How do I fix this?

May 10th, 2008 by joachim

While configuring a local Apache2 server using Ubuntu 7.04 I came across this error message:

[Wed Mar 21 16:18:35 2007] [crit] [client 192.168.178.24] (13): /home/myusername/.htaccess pcfg_openfile: unable to check ht
access file, ensure it is readable

This message remained even after I created the file /home/myusername/.htaccess and made it world-readable.

I figured out that Apache has been unable to read the dir /home/myusername/ so I added the user www-data to the group “myusername”:

  1. adduser www-data myusername

This fixes the problem because /home/myusername has the owen myusername and the group myusername. www-data is the user apache is running under.

Posted in Apache Webserver |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.