[Samba] Lighttpd + Samba for read/write?

Stan Hoeppner stan at hardwarefreak.com
Tue Aug 2 01:11:49 MDT 2011


On 8/1/2011 7:50 PM, Gilles wrote:
> On Mon, 01 Aug 2011 11:22:13 -0500, Stan Hoeppner
> <stan at hardwarefreak.com> wrote:
>> After you change ownership to www-data:www-data, use chmod to allow
>> desired users to write the directory.  Without this step only the
>> www-data user can write.
> 
> Thanks for the tip. I'll see if Lighttpd is OK with a non-root user
> owning its docroot direcotyr.

As I stated, I am running lighttpd with a non-root user owning the
docroot, have been for years.  It's the Debian lighttpd setup default to
have www-data own /var/www and lighttpd executing as the www-data user.
 Examine your /etc/lighttpd/lighttpd.conf for the Ubuntu defaults.

Note that this is all configurable.  One could create a user:group
"santa-claus:santa-claus", give him ownership of /var/www, and modify
lighttpd.conf to run as user "santa-claus:santa-claus".  However, doing
something like this may cause problems with other distro packages that
might expect these things to be the default
values/locations/permissions.  Keep this in mind if something doesn't
work after switching to www-data.  Probably worth reading the Ubuntu
docs WRT lighttpd.

/var$ ls -la
...
drwxrwx---  2 www-data www-data 4.0K Aug  2 01:22 www

I use 770 permissions.

~$ aptitude show -v lighttpd
Package: lighttpd
State: installed
Automatically installed: no
Version: 1.4.28-2

/etc/lighttpd$ grep www-data lighttpd.conf
server.username            = "www-data"
server.groupname           = "www-data"

-- 
Stan



More information about the samba mailing list