0

My situation:

  • Client (Windows 10) -> Server (Debian 10 / Samba Version 4.9.5-Debian) -> NAS (Lenovo ix2)

  • From Client (Windows 10), I can create, rename, delete, change files and folders without any problem but I cannot retrieve DOS/Windows Files Attribute information (read-write, Hide, System) or set it !

  • Windows 10 have SMBv1 enabled

  • Server Debian is updated to 10.10 from 8 (new hardware machine, clean installation, from scratch) ; with version 8.0 the problem was not there.

  • Server mount - via fstab, but is the same with prompt - NAS share with:

    //NAS/STORAGE /mnt/STORAGE cifs username=...,password=...,rw,dir_mode=0777,file_mode=0666,uid=...,gid=...,noauto,noserverino,nounix,vers=1.0 

    I have tried vers=2.0, vers=3.0, and many other... and omit option, but nothing

  • Server (Debian 10) mount (on "/mnt" path subfolder) many other windows sharing (Window 10, Windows 7, Windows NT 4.0) and I haven't any problem, only on NAS (Lenovo ix2) not working properly.

  • smb.conf:

    [global] workgroup = WORKGROUP # *** I have tried many parameter for protocol: #client min protocol = SMB2 #server min protocol = SMB2 #client max protocol = NT1 #server max protocol = NT1 #max protocol = NT1 interfaces = 127.0.0.0/8 enp11s0f0 enp11s0f1 10.9.8.1 bind interfaces only = yes log file = /var/log/samba/log.%m max log size = 1000 server role = standalone server netbios name = PIGRECO server string = Distributed File Server - Samba %v (%h) interfaces = lo enp11s0f0 enp11s0f1 local master = yes domain master = yes preferred master = yes os level = 35 encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd guest account = studio ldap ssl = no client lanman auth = yes client plaintext auth = yes wins support = yes dfree command = /usr/local/bin/dfree [COMMON] comment = Common PIGRECO Archive path = /mnt force user = studio read only = No create mask = 0777 directory mask = 0777 guest ok = Yes hosts allow = 192.168.0. 172.0.0. 10.9.8. strict locking = No browsable = Yes # The "ea support" set to "no" don't solve the problem: #ea support = no vfs objects = recycle recycle:repository = /mnt/STORAGE/Trash recycle:keeptree = Yes recycle:versions = Yes recycle:maxsize = 104857600 
  • I have tried the CIFS debug (with echo 7 > /proc/fs/cifs/cifsFYI ) and get this error:

    Status code returned 0xc000004f NT_STATUS_EAS_NOT_SUPPORTED 

    but i cannot find any information online.

  • In /mnt I have created new sub-folder for NAS, like other folder (permission and owner) but only read/write file creation permission is influenced when I change linux attrib/owner.

Any suggestions?

2 Answers 2

2

I have found this settings for samba config file (/etc/samba/smb.conf):

[global] client min protocol = SMB2_10 client max protocol = SMB3_11 client ipc min protocol = SMB2_10 client ipc max protocol = SMB3_11 server min protocol = SMB2_10 server max protocol = SMB3_11 map readonly = permissions store dos attributes = no 

And now, I'm able to change files permissions from Windows 7/10 .

0

DOS attributes can be stored either in filesystem Extended Attributes (if the underlying filesystem can handle them) or as maps onto traditional UNIX file permission bits

This combination should use an Extended Attribute where possible, and fall back to UNIX file permission bits otherwise:

store dos attributes = yes ; Default yes map archive = yes ; Default yes map hidden = yes ; Default no map readonly = yes ; Default no map system = yes ; Default no 

Since the default is already to store dos attributes, and this isn't working for you, it's possible that your underlying filesystem can't handle extended attributes and you may need to set store dos attributes = no.

Note that the man page (see man smb.conf) writes that,

On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel.

Perhaps this is the underlying reason that storing DOS attributes isn't working for you.

On an entirely unrelated note, SMBv1 has been deprecated and you shouldn't need to be using it anymore. If you need, you can have your server accept SMBv1 (as well as later versions), but Windows 10 will prefer to use SMBv3 before dropping down to the older levels.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.