Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In /etc/apache2/sites-available/default I made the /home/me/www folder my localhost location. I have downloaded Drupal into the new www/drupal folder and even though I gave all permissions (777) Apache still can't write to it. Do I need to make another permission change?

TO make localhost not 403, I followed the steps in: http://askubuntu.com/a/232078/25656

sudo apt-get install acl
You can use man setfacl to have more info.

To add permissions to Apache:
sudo setfacl -m d:g:www-data:X,g:www-data:X /home/me
sudo setfacl -m d:g:www-data:X,g:www-data:X /home/me/Dropbox
sudo setfacl -Rm d:g:www-data:rX,g:www-data:rX /home/me/Dropbox/Web`

/etc/apache2/sites-available/defaulthttp://paste.ubuntu.com/1534943/.

share|improve this question
1  
Are you tried with 755? No 777 permissions, 755!!! Also, owner of /home/user/www folder must be www-data:www-data. –  ZDroid Jan 15 '13 at 16:40
    
Could you insert the relevant lines from /etc/apache2/sites-available/default? What does ls -l /etc/apache2/sites-enabled/ show` –  qbi Jan 15 '13 at 16:56
    
ls -l /etc/apache2/sites-enabled/: total 0 lrwxrwxrwx 1 root root 26 Jan 14 21:34 000-default -> ../sites-available/default –  imhere Jan 15 '13 at 17:02
    
755 is not working. Wehn I go sudo chown www-data:www-data www/ I still am not able to get the files writable via apache –  imhere Jan 15 '13 at 17:05
    
Before I try, should I do this: chmod 751 "$HOME" sudo chmod 751 /home –  imhere Jan 15 '13 at 17:21

1 Answer 1

I have a similar setup in my machine (apache root in home folder). The folder used as apache root (~/Software/apache_htdocs) belongs to my user and has 755 permissions (but 777 should work as well). Apache runs with www-data user, as default.

The only difference seems to be in sites-available:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/myusername/Software/apache_htdocs
        <Directory />
                Options FollowSymLinks
                AllowOverride None
                allow from all
        </Directory>

        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
            </Directory>

        (... content omitted ...)
</VirtualHost>

So try deleting the second Directory directive and add allow from all on the first. To be safe, before modifying it make a backup of the file. After that restart Apache using sudo service apache2 restart.

Hope it helps

share|improve this answer
    
Thanks for reply. I am still getting the same issue after update. If I change ownership to www-data:www-data it works, but this just seems like an extra step. –  imhere Jan 15 '13 at 20:00

Your Answer

 
discard

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.