[Samba] FreeBSD / Samba / usr/local/apache24

Rowland penny rpenny at samba.org
Sun Jan 5 09:20:32 UTC 2020

On 04/01/2020 22:13, bret_stern via samba wrote:
> On 1/4/2020 12:28 PM, Rowland penny via samba wrote:
>> On 04/01/2020 19:51, bret_stern via samba wrote:
>>> Good day,
>>> I have hosted several domain websites under my apache24 web server 
>>> on FreeBSD 10.1 for several years. I had Samba configured to allow 
>>> updating files from my window 7/XP machines.
>>> My freeBSD 10.1 server still allows me to copy files into the 
>>> freebsd apache24 folders: /usr/local/www/apache24..and below.
>>> Notes: I can ssh into both servers with FreeBSD user accounts
>>> using my username/password. But cannot copy files into the
>>>  /usr/local/www/apache24...or below folders (read only during ssh
>>> session)
>>> So it appears Samba is overriding the file system permissions.
>>> Trying to move to FreeBSD 12.1
>>> Changes
>>> On FreeBSD 10.1, my smb.conf file has the following share used:
>>> security = share
>>> On FreeBSD 12.1, my smb4.conf file has the following change
>>> security = user
>>> The following share directive is in both original smb.conf and new
>>> smb4.conf
>>> [ww]
>>>  path=/usr/local/www/apache24
>>>  browseable = yes
>>>  read only = no
>>>  public = yes
>>>  writable = yes
>>> On the new FreeBSD server with samba48 installed, I can view the 
>>> folders
>>> in /usr/local/www/apache24..and below. But cannot write to them.
>>> Even though this may be an unorthodox manner to update my websites, 
>>> I run a pretty tight ship here, so, if I can do what was previously 
>>> able to do under freeBSD 10.1 and Samba 3.625...it would be preferred.
>>> Would like any ideas to determine what is allowing me to write files 
>>> to the old server web site files, or preventing me from writing 
>>> files on
>>> the new server.
>>> Sorry for the long story,
>>> Regards,
>>> Bret
>> Sorry, but it isn't long enough ;-)
>> Can you post your entire smb.conf.
>> There have been quite a lot of changes between 3.6.x and 4.8.x
>> Rowland
> Never posted here before, hope bottom posting ok. Been getting along 
> without really investigating the samba setup, so now I'm learning.
> FYI.. created user: smbpasswd -a bret   and .. smbpasswd -e bret
Bottom posting is always preferred ;-)

Your effective smb.conf is this:

    workgroup = workgroup
    server string = Samba Server
    security = user
    server role = standalone server
    log file = /usr/local/samba/var/log.%m
    max log size = 50
    dns proxy = no

    comment = Home Directories
    browseable = no
    writable = yes

  read only = no
  public = yes

It looks like you want the 'ww' share to be a guest share, 'public' is a 
synonym for 'guest ok'. However, guest access will never work, because 
you are missing 'map to guest = bad user' in global, but if you do set 
this, any new files and directories created will belong to 'nobody:nogroup'.

You refer to connecting to the computer via SSH, this has nothing to do 
with Samba. If you are wishing to modify files in the share via Samba, 
then the underlying permissions set on /usr/local/www/apache24 will have 
to allow the user to do this.

I think you need to describe what you want to do and how you want to do it.


More information about the samba mailing list