[Samba] Lighttpd + Samba for read/write?

Stan Hoeppner stan at hardwarefreak.com
Tue Aug 2 09:38:11 MDT 2011

On 8/2/2011 8:41 AM, Gilles wrote:
> On Tue, 02 Aug 2011 02:11:49 -0500, Stan Hoeppner
> <stan at hardwarefreak.com> wrote:
>> As I stated, I am running lighttpd with a non-root user owning the
>> docroot, have been for years
> Thanks for the info. Turns out there already was a UID "www-data" in
> /ec/passwd, and lighttpd.conf used that UID by default.
> However, when creating a new text file in /var/www, its access rights
> are 744, which doesn't make sense for a non-executable file:
> ===========
> # ll /var/www/
> total 16
> drwxr-xr-x  2 www-data www-data 4096 2011-08-02 15:35 ./
> drwxr-xr-x 14 root     root     4096 2011-08-01 14:35 ../
> -rw-r--r--  1 root     root     3562 2011-08-01 14:35
> index.lighttpd.html
> -rwxr--r--  1 www-data www-data    4 2011-08-02 15:35 test.txt*
> ===========
> The smb.conf documentation mentions "create mask", but how can I tell
> Samba to use a different mask depending on the type of the file
> (executable and non-executable)?

Reference your [homes] section of smb.conf to answer your first question
WRT masks.  WRT the 2nd question, XP will execute a Windows binary file
residing on a Samba share whether the UNIX execute bit is set on the
file or not.  The execute bit is only required if you want the Samba
host itself to be able to execute a UNIX binary.  This is the behavior
on my systems anyway.  If you really desire the latter, I'm not sure how
to achieve it.  In my case, in the rare instances where this has been
needed, I simply ssh into the Samba box and perform a "chmod +x

How often are you going to copy UNIX binaries from an XP machine into a
Samba share, and then execute said binary on the Samba host?


More information about the samba mailing list