I am a TrueNAS newbie and run into an issue when comparing copied directories in a smb share. After setting up an unkown piece of software, I don't trust it and try to verify results to gain confidence. That's a result of working in the IT since a long time 
I was alarmed when the copied directory tree showed more files than the original. This happens because hidden files in the original location are exposed in the copied location. The hidden attribute is stripped during the copy.
I researched for hours in the internet and tried several things but I don't get this fixed. And I want a 1:1 copy. Hidden files must remain hidden when copied. Cross checked this with my Win10 local filesystem and with a Synology NAS share. In both cases the hidden attribute is preserved.
After running into this issue, I shut down the prod environment and set up a test environment and verified that it behaves exactly the same. I know that the specs of this lab installation don't meet the requirements but as it behaves the same and performance/stability is of no concern, it should be ok for troubleshooting.
My user jh is a member of the samba group that I added to the dataset ACL. The same user is used on the Win10 host to mount the share.
Even a direct copy as root in the TrueNAS shell strips this attribute when
But, interestingly, when doing this, the attribute is preserved
DOS shell shows
Do you have a clue where to look?
I was alarmed when the copied directory tree showed more files than the original. This happens because hidden files in the original location are exposed in the copied location. The hidden attribute is stripped during the copy.
I researched for hours in the internet and tried several things but I don't get this fixed. And I want a 1:1 copy. Hidden files must remain hidden when copied. Cross checked this with my Win10 local filesystem and with a Synology NAS share. In both cases the hidden attribute is preserved.
After running into this issue, I shut down the prod environment and set up a test environment and verified that it behaves exactly the same. I know that the specs of this lab installation don't meet the requirements but as it behaves the same and performance/stability is of no concern, it should be ok for troubleshooting.
My user jh is a member of the samba group that I added to the dataset ACL. The same user is used on the Win10 host to mount the share.
Even a direct copy as root in the TrueNAS shell strips this attribute when
root@truenas-test[/mnt/t/w]# cp 1.jpg 2.jpgBut, interestingly, when doing this, the attribute is preserved
root@truenas-test[/mnt/t/w]# cp -p 1.jpg 3.jpgDOS shell shows
Code:
X:\>attrib A H X:\1.jpg A X:\2.jpg A H X:\3.jpg
Do you have a clue where to look?
TrueNAS-12.0-U2.1
Supermicro X11SCH-F
i5-9400F
32GB RAM
8 x 3TB WD Red as RaidZ2
Supermicro X11SCH-F
i5-9400F
32GB RAM
8 x 3TB WD Red as RaidZ2
TrueNAS-12.0-U2
Asrock Beebox
Virtualbox, 4GB memory for VM
I know, lousy but for testing...
Asrock Beebox
Virtualbox, 4GB memory for VM
I know, lousy but for testing...
Code:
root@truenas-test[/etc/local]# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Server role: ROLE_STANDALONE
# Global parameters
[global]
aio max threads = 2
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
enable web service discovery = Yes
kernel change notify = No
load printers = No
logging = file
max log size = 5120
netbios name = TRUENAS
nsupdate command = /usr/local/bin/samba-nsupdate -g
registry shares = Yes
restrict anonymous = 2
server role = standalone server
server string = TrueNAS Server
unix extensions = No
username map = /usr/local/etc/smbusername.map
username map cache time = 60
idmap config *: range = 90000001-100000000
idmap config * : backend = tdb
directory name cache size = 0
dos filemode = Yes
[w]
ea support = No
kernel share modes = No
path = /mnt/t/w
posix locking = No
read only = No
vfs objects = streams_xattr shadow_copy_zfs ixnas aio_fbsd
nfs4:chown = true
root@truenas-test[/etc/local]#
Code:
root@truenas-test[/etc/local]# getfacl /mnt/t/w
# file: /mnt/t/w
# owner: root
# group: wheel
owner@:rwxpDdaARWcCos:fd-----:allow
group@:rwxpDdaARWcCos:fd-----:allow
group:samba:rwxpDdaARWc--s:fd-----:allow
everyone@:--------------:fd-----:allow
root@truenas-test[/etc/local]#