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

bret_stern bret_stern at machinemanagement.com
Sun Jan 5 17:54:41 UTC 2020



On 1/5/2020 1:20 AM, Rowland penny via samba wrote:
> 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
>> THANKS FOR LOOKING!!
>>
> Bottom posting is always preferred ;-)
> 
> Your effective smb.conf is this:
> 
> [global]
>     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
> 
> [homes]
>     comment = Home Directories
>     browseable = no
>     writable = yes
> 
> [ww]
>   path=/usr/local/www/apache24
>   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.
> 
> Rowland
> 
> 
> 

I'll try some of your suggestions to see results.
My point about ssh was that: if I can't write to the apache24 folders as 
a local logged on user, why does Samba allow it?

Really appreciate the input. Sometimes these issues are spread across 
multiple competing configurations.

Glad to be in the loop on Samba issues, most certainly will learn 
observing issues.
Cheers
Bret





More information about the samba mailing list