Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I know this question is asked a lot, but the solutions I saw didn't work for me.

I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document roots

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

Alias /movies /home/username/Videos/Movies

<Directory /home/username/Videos/Movies/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

I set /etc/apache2/envvars as follows

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=public

I made sure that /home/username/Videos/ and it's sub floders are owned by username:public, set the permissions to 777 (after 775 didn't work) and made sure that user www-data belongs to group public.

Now, when I enter localhost/movies I get

[Mon Apr 21 11:28:14.971844 2014] [core:error] [pid 1385:tid 140067725104896] (13)Permission denied: [client] AH00035: access to /movies/ denied (filesystem path '/home/username/Videos') because search permissions are missing on a component of the path

But when I set /etc/apache2/envvars to run Apache under username (my own username) everything works fine. The problem is permission related, but I don't see how in my case, especially when I set the permissions to 777. Any ideas?


P.S. Ubuntu version is 14.04, Apache is 2.4.7 and I didn't edit other configuration files.

share|improve this question
possible duplicate of How do I give www-data user to a folder in my home folder? – NGRhodes Apr 21 '14 at 9:08
I did everything they suggested over there, as I wrote, and it does not help – Yotam Apr 21 '14 at 9:41
Any chance you have mounted your /home with ACL enabled? (there is a "+" sign at the end of the permission bits if it's the case (check with ls -l)) – Polosson Apr 22 '14 at 8:06
No, I didn't do it. Right now I'm running Apache under my user, so it's working, but I'd like to run it under another user for security reasons. – Yotam Apr 23 '14 at 13:33
I'm using Linux for the first time. I downloaded Ubuntu 14.04 LTE version. I'm facing the same problem. Can anyone help please? – Imdad Jun 24 '14 at 13:26

2 Answers 2

up vote 9 down vote accepted

Sorry, seems you have not found an answer yet. I just stumbled over this page. I encountered the same error. I'm adding this answer so that it will help anyone else.

Do a chmod +x on your user dir, and restart apache. 755 permissions should work. I've had problems with 644. Hope this helps you in your own case.

share|improve this answer
Indeed, and to double check file and directory permissions, if available, you can use namei -m /home/youruser/public_html/yourfile.ext or try – Junior M Jun 27 at 19:06
to clarify, any directory you want Apache to read, must be readable for Apache user. Most likely your user home folder is not owned by you user and group, therefor you have to set 755 permissions to /home/username to access it with apace. – ruuter Sep 1 at 10:06

You might have selinux enabled. Try


If it shows "Enforcing", try

setenforce 0

and try if this fixes your issue.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.