www-data permissions on /var/www

Knute Johnson ubuntu at knutejohnson.com
Mon Nov 26 16:17:42 UTC 2012


On 11/26/2012 12:35 AM, Colin Law wrote:
> On 26 November 2012 00:28, Knute Johnson <ubuntu at knutejohnson.com> wrote:
>> On 11/25/2012 00:37, Ric Moore wrote:
>>>
>>> On 11/25/2012 02:21 AM, katrina warsaw wrote:
>>>>
>>>> Hello!:
>>>>
>>>> You must think that human users have their userids upper of 1000.
>>>> www-data user is really the user who admins the website, is the user and
>>>> group of your webserver , and  your web's user or your web's visitors
>>>> are from group "others".
>>>> I wish this helps you!
>>>
>>>
>>> Correct, user AND group must be set to www-data.
>>> sudo chmod -R www-data:www-data /var/www
>>> You'll be good to go if everything, directories AND data files, are set
>>> in that fashion. Ric
>>
>>
>> What do you do if you need a directory writable by someone other than
>> www-data?  In my case a web cam that needs to upload images?
>
> Put the user that is running the web cam s/w in the www-data group.  A
> user can be in many groups.
>
> Colin
>

The webcam uploads files via FTP.  So I made the website directory owned 
by the webcam user.  Does it make more sense to have all the web 
documents and directories owned by www-data?

Thanks,

-- 

Knute Johnson




More information about the ubuntu-users mailing list