Samba server : issue with file transfer from Windows network with share special properties

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Samba server : issue with file transfer from Windows network with share special properties

jeanfrancois
Good afternoon,

I built up a samba server which is coupled on an infrastructure with
other Windows servers.

It has sometimes error messages when copy which I tracked to being from
Windows network to the Samba server where source files or folders's
properties are not supported (like archiving option).

In other words Windows client complains the host doesn't support pops an
error message on each on these items.


Has someone a fix for this, or can point out what I may have missed ?

The configuration file is really simple:


[global]

workgroup = WORKGROUP
server string = %h server

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192
SO_SNDBUF=8192

log file = /var/log/samba/smbd.%m
max log size = 1024
syslog = 0
dns proxy = no
domain master = yes
netbios name = sambaserver
preferred master = yes
map to guest = Bad User
invalid users = root
unix password sync = yes
domain logons = no

[localshare]
     browseable = yes
     path = /home/pub
     writeable = yes
     guest ok = yes
     valid users = localshare
     directory mask = 0777

[public]
     browseable = yes
     path = /home/pub
     public = yes
     writeable = yes
     guest ok = yes
     force user = nobody
     create mask = 0777
     directory mask = 0777


Thank you,

Jean-François

Reply | Threaded
Open this post in threaded view
|

Re: Samba server : issue with file transfer from Windows network with share special properties

Kenneth Gober
On Mon, Mar 22, 2021 at 9:11 AM jeanfrancois <[hidden email]> wrote:

> It has sometimes error messages when copy which I tracked to being from
> Windows network to the Samba server where source files or folders's
> properties are not supported (like archiving option).
>


> Has someone a fix for this, or can point out what I may have missed ?


Consult the smb.conf man page ("man smb.conf") and read about the
"map readonly", "map archive", "map hidden" and "map system" options.
These may help you.

-ken
Reply | Threaded
Open this post in threaded view
|

Re: Samba server : issue with file transfer from Windows network with share special properties

jeanfrancois
Thanks

Le 24/03/2021 à 17:00, Kenneth Gober a écrit :

> On Mon, Mar 22, 2021 at 9:11 AM jeanfrancois <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     It has sometimes error messages when copy which I tracked to being
>     from
>     Windows network to the Samba server where source files or folders's
>     properties are not supported (like archiving option).
>
>     Has someone a fix for this, or can point out what I may have missed ?
>
>
> Consult the smb.conf man page ("man smb.conf") and read about the
> "map readonly", "map archive", "map hidden" and "map system" options.
> These may help you.
>
> -ken
Reply | Threaded
Open this post in threaded view
|

Re: Samba server issue with Windows file properties

jeanfrancois
In reply to this post by Kenneth Gober
Good day,


Sorry to bother with this issue, if someone has a few minutes to check
for hint that'd be very helpful.

Thank you.


After trying everything I could think of, still samba doesn't seem to
properly work with windows special properties:

map archive
map ...

 From windows's properties, the Unix properties don't map the archive,
... states, now can we change them.

Changing for example a file or folder to "hidden" from windows results
in error request not supported.

Changing the Unix property in the OpenBSD file system don't result in
showing proper states in Windows.


Do you have hints, does enable the samba map need something else be
setup in samba configuration or specific to OpenBSD ?


I note the "Archive" should be on by default but don't work, I think the
issue may not be in samba configuration.


Here are few configuration files:


fstab


/dev/wd1a /home/pub/ ffs rw 1 2


smb.conf


[global]

workgroup = WORKGROUP
server string = %h server

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192
SO_SNDBUF=8192

log file = /var/log/samba/smbd.%m
max log size = 1024
syslog = 1
log level = 3

dns proxy = no

domain master = yes
netbios name = sambaserver
local master = yes

map to guest = Bad User
invalid users = root
unix password sync = yes
domain logons = no
usershare allow guests = yes

#========== Share Definitions ============

[localshare]
     browseable = yes
     path = /home/pub
     writeable = yes
     guest ok = yes
     valid users = localshare
     create mask = 0755
     directory mask = 0755

     map readonly = yes
     map archive = yes
     map hidden = yes
     map system = yes


Le 24/03/2021 à 17:00, Kenneth Gober a écrit :

> On Mon, Mar 22, 2021 at 9:11 AM jeanfrancois <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     It has sometimes error messages when copy which I tracked to being
>     from
>     Windows network to the Samba server where source files or folders's
>     properties are not supported (like archiving option).
>
>     Has someone a fix for this, or can point out what I may have missed ?
>
>
> Consult the smb.conf man page ("man smb.conf") and read about the
> "map readonly", "map archive", "map hidden" and "map system" options.
> These may help you.
>
> -ken
Reply | Threaded
Open this post in threaded view
|

Re: Samba server issue with Windows file properties

kasak
hello.

You should look the option "store dos attributes"

quote: When this parameter is set it will override the parameters map
hidden, map system, map archive and map readonly and they will behave as
if they were set to off.

this option is by default ENABLED in samba 4.9. And when it is enabled,
samba will try to store dos attributes in

extended attributes of filesystem.

OpenBSD ffs does not have support or extended attributes.

And your "map" options does not work, because "store dos attributes" is
set.

Try to add "store dos attributes = no" to share definition.

07.04.2021 11:39, jeanfrancois пишет:

> Good day,
>
>
> Sorry to bother with this issue, if someone has a few minutes to check
> for hint that'd be very helpful.
>
> Thank you.
>
>
> After trying everything I could think of, still samba doesn't seem to
> properly work with windows special properties:
>
> map archive
> map ...
>
> From windows's properties, the Unix properties don't map the archive,
> ... states, now can we change them.
>
> Changing for example a file or folder to "hidden" from windows results
> in error request not supported.
>
> Changing the Unix property in the OpenBSD file system don't result in
> showing proper states in Windows.
>
>
> Do you have hints, does enable the samba map need something else be
> setup in samba configuration or specific to OpenBSD ?
>
>
> I note the "Archive" should be on by default but don't work, I think
> the issue may not be in samba configuration.
>
>
> Here are few configuration files:
>
>
> fstab
>
>
> /dev/wd1a /home/pub/ ffs rw 1 2
>
>
> smb.conf
>
>
> [global]
>
> workgroup = WORKGROUP
> server string = %h server
>
> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
> SO_RCVBUF=8192 SO_SNDBUF=8192
>
> log file = /var/log/samba/smbd.%m
> max log size = 1024
> syslog = 1
> log level = 3
>
> dns proxy = no
>
> domain master = yes
> netbios name = sambaserver
> local master = yes
>
> map to guest = Bad User
> invalid users = root
> unix password sync = yes
> domain logons = no
> usershare allow guests = yes
>
> #========== Share Definitions ============
>
> [localshare]
>     browseable = yes
>     path = /home/pub
>     writeable = yes
>     guest ok = yes
>     valid users = localshare
>     create mask = 0755
>     directory mask = 0755
>
>     map readonly = yes
>     map archive = yes
>     map hidden = yes
>     map system = yes
>
>
> Le 24/03/2021 à 17:00, Kenneth Gober a écrit :
>> On Mon, Mar 22, 2021 at 9:11 AM jeanfrancois <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     It has sometimes error messages when copy which I tracked to being
>>     from
>>     Windows network to the Samba server where source files or folders's
>>     properties are not supported (like archiving option).
>>
>>     Has someone a fix for this, or can point out what I may have
>> missed ?
>>
>>
>> Consult the smb.conf man page ("man smb.conf") and read about the
>> "map readonly", "map archive", "map hidden" and "map system" options.
>> These may help you.
>>
>> -ken

Reply | Threaded
Open this post in threaded view
|

Re: Samba server issue with Windows file properties

jeanfrancois
Correct fix, thank you for spotting this.


Jean-François


Le 07/04/2021 à 11:14, kasak a écrit :

> hello.
>
> You should look the option "store dos attributes"
>
> quote: When this parameter is set it will override the parameters map
> hidden, map system, map archive and map readonly and they will behave
> as if they were set to off.
>
> this option is by default ENABLED in samba 4.9. And when it is
> enabled, samba will try to store dos attributes in
>
> extended attributes of filesystem.
>
> OpenBSD ffs does not have support or extended attributes.
>
> And your "map" options does not work, because "store dos attributes"
> is set.
>
> Try to add "store dos attributes = no" to share definition.
>
> 07.04.2021 11:39, jeanfrancois пишет:
>> Good day,
>>
>>
>> Sorry to bother with this issue, if someone has a few minutes to
>> check for hint that'd be very helpful.
>>
>> Thank you.
>>
>>
>> After trying everything I could think of, still samba doesn't seem to
>> properly work with windows special properties:
>>
>> map archive
>> map ...
>>
>> From windows's properties, the Unix properties don't map the archive,
>> ... states, now can we change them.
>>
>> Changing for example a file or folder to "hidden" from windows
>> results in error request not supported.
>>
>> Changing the Unix property in the OpenBSD file system don't result in
>> showing proper states in Windows.
>>
>>
>> Do you have hints, does enable the samba map need something else be
>> setup in samba configuration or specific to OpenBSD ?
>>
>>
>> I note the "Archive" should be on by default but don't work, I think
>> the issue may not be in samba configuration.
>>
>>
>> Here are few configuration files:
>>
>>
>> fstab
>>
>>
>> /dev/wd1a /home/pub/ ffs rw 1 2
>>
>>
>> smb.conf
>>
>>
>> [global]
>>
>> workgroup = WORKGROUP
>> server string = %h server
>>
>> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
>> SO_RCVBUF=8192 SO_SNDBUF=8192
>>
>> log file = /var/log/samba/smbd.%m
>> max log size = 1024
>> syslog = 1
>> log level = 3
>>
>> dns proxy = no
>>
>> domain master = yes
>> netbios name = sambaserver
>> local master = yes
>>
>> map to guest = Bad User
>> invalid users = root
>> unix password sync = yes
>> domain logons = no
>> usershare allow guests = yes
>>
>> #========== Share Definitions ============
>>
>> [localshare]
>>     browseable = yes
>>     path = /home/pub
>>     writeable = yes
>>     guest ok = yes
>>     valid users = localshare
>>     create mask = 0755
>>     directory mask = 0755
>>
>>     map readonly = yes
>>     map archive = yes
>>     map hidden = yes
>>     map system = yes
>>
>>
>> Le 24/03/2021 à 17:00, Kenneth Gober a écrit :
>>> On Mon, Mar 22, 2021 at 9:11 AM jeanfrancois <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>     It has sometimes error messages when copy which I tracked to being
>>>     from
>>>     Windows network to the Samba server where source files or folders's
>>>     properties are not supported (like archiving option).
>>>
>>>     Has someone a fix for this, or can point out what I may have
>>> missed ?
>>>
>>>
>>> Consult the smb.conf man page ("man smb.conf") and read about the
>>> "map readonly", "map archive", "map hidden" and "map system" options.
>>> These may help you.
>>>
>>> -ken