Alterative Data Stream (ADS) missreporting on QNAP shares

FTP Server, File Server, DDNS, SAMBA, AFP, NFS
Post Reply
TECH1982
Starting out
Posts: 31
Joined: Wed May 12, 2021 2:16 pm

Alterative Data Stream (ADS) missreporting on QNAP shares

Post by TECH1982 »

Sometimes (presumably on Mac, but i guess it could also happen from Windows as well), part of SAMA on QNAP is creating <folder_name>/.streams folder at:

/share/CACHEDEV1_DATA
to access you can enable SFTP and use WinSCP or any FTP client with support SFTP and connect on port 22

https://www.qnap.com/en/how-to/faq/arti ... red-folder

When i deleted a 1.41 Gig folder, Filestation and SMB share shows "empty" yet share on NAS still reports this 1.41Gig.. and this ADS is responsible for this however it took ages. to delete over SSH.

Is there a reason why .streams must be created ?
User avatar
NoName
Know my way around
Posts: 118
Joined: Mon Feb 16, 2015 11:01 pm

Re: Alterative Data Stream (ADS) missreporting on QNAP shares

Post by NoName »

Not sure what you need as an answer, the link you added, is telling what the .streams dir is for: saving the extended NTFS attributes on a Samba share. It may be got extended in the mean time to Mac specific attributes or you copied files from NTFS to your NAS?

It is related to the Samba feature 'virtual file systems' https://wiki.samba.org/index.php/Virtua ... em_Modules, with most likely the xattr module used https://wiki.samba.org/index.php/Using_ ... VFS_Module
TECH1982
Starting out
Posts: 31
Joined: Wed May 12, 2021 2:16 pm

Re: Alterative Data Stream (ADS) missreporting on QNAP shares

Post by TECH1982 »

ok,,,, It may have been something that was always part of samba versions in qts, just wasn't aware.. In this case, even though the directory was emoty, i just deleted the share and it also removed the relevant .streams folder as well. but it would be better if it was never there in the first place.. as it occupies space on hard drive even if folder over SMB share is empty... (aka you delete contents of folder)

I think your right. "how" i placed them on NAS was from Mac ... However macs can read NTFS too. just not write. If its extend attributives then there is probably no way not to have it on NAS

I used Filezilla to SFTP in and delete ADS stuff, and that took well over 2 hours to remove.... I may just decide to delete entire share going forward to avoid build up
User avatar
NoName
Know my way around
Posts: 118
Joined: Mon Feb 16, 2015 11:01 pm

Re: Alterative Data Stream (ADS) missreporting on QNAP shares

Post by NoName »

Filezilla (or any other (S)FTP client and/or shell) are not recognizing the VFS (so not dealing with the .stream folder in an automated way). If you delete files using the share, Samba should take care of the attributes as well. If you don't want to use ADS and want to deactivate it completly, You have to edit your smb.cnf. There will be line(s) starting with 'vfs objects ='. You can delete or better comment those lines (adding # at the beginning) and restart Samba (or run 'smbcontrol all reload-config' on the shell). It will change how your Mac will handle the share if your Mac handles ADS.

I strongly suggest to make a backup copy of your smb.cnf, having a a backup of your files on the share isn't a bad idea also. I don't expect something to happen, but just in case...
Post Reply

Return to “File Sharing”