Report this

What is the reason for this report?

No User Can Access /var/www/vhosts Folder

Posted on December 24, 2013

I built an Ubuntu 12.04 droplet, installed a LAMP stack, created a couple users, added one of them to the www-data group, and created a folder for that user at /var/www/vhosts/<sitename>/. The problem is, that user cannot access that folder. Further testing revealed that no user other than root can access it or any folder I create in /var/www.

I have added users to the www-data group, I have changed the ownership of the folder to the users, I have even set permissions to 777 on the folder. No matter what I do only root can access the folders. Apparently the www-data user cannot access it either because web visitors cannot access any files I place in the folder either.

Below is some info on the folder and one of the users in question. Does anyone know what could be causing this?

<deploy user>

<passwd> deploy:x:1001:33:Deploy,:/home/deploy:/bin/bash

<group> www-data:x:33:deploy

<the folder>

root@test:~# ls -al /var/www/vhosts/<SITENAME>/ total 20 drwxrwsrwx 5 deploy www-data 4096 Dec 23 15:06 . drwxrw-r-- 3 root www-data 4096 Dec 23 15:06 … drwxrwsrwx 2 deploy www-data 4096 Dec 23 15:06 backups drwxrwsrwx 6 deploy www-data 4096 Dec 23 16:19 httpdocs drwxrwsrwx 2 deploy www-data 4096 Dec 23 15:06 logs

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.