[Samba] Weird folders / files after upgrading to Samba 4.20

Matthias Kühne | Ellerhold Aktiengesellschaft matthias.kuehne at ellerhold.de
Wed Jul 17 07:54:29 UTC 2024


Hello lovely samba-people,

after upgrading to 4.20 some file shares randomly get weird directories 
and files in them:

drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:14 ''$'\352'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:14 ''$'\324'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 18 01:12 ''$'\001\002'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:14 ''$'\252\003\246\001'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:14 ''$'\261\003''@'$'\005'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 20 01:10 ''$'\201\t\244\001'
drwxrwx---+    4 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 ''$'\020'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 28 01:13 ''$'\025\002'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 11 01:11 ''$'\032'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:14 '<'$'\t\244\001'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 '<+'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 21 01:10 '>'$'\276'']'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 21 01:10 '\'$'\303'']'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00  0
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 '0F0'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 ''$'\340''~4'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 19 01:12 ''$'\300\354''6I'$'\222\177'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 ''$'\320\340''6'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 ''$'\340\235''7'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00  8
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 '8W=f'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 ''$'\005''Bbf'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 'ͩ[f'
-rwxrwx---+    1 AD-ELLERHOLD\user AD-ELLERHOLD\group 6.1K Apr  3  2019  .DS_Store
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 ''$'\005\356\360''e'
drwxrwx---+    4 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jul  2 13:19  domain.de
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 ''$'\030\276\031''f'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 '='$'\264'':f'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 '_'$'\005\006''f'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:02 ''$'\020''h6'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00  _images
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 30 01:14 'j'$'\307''Vf'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 25 01:00  ld-webshop
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:13 'p'$'\t\244\001'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01  P
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 29 01:13 'P'$'\t\244\001'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 'P'$'\250''3'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 'p'$'\227''<'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 'p'$'\243''='$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 'p'$'\354''>'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 21 01:10 'Q'$'\016\310''e'
drwxrwx---+ 9985 AD-ELLERHOLD\user AD-ELLERHOLD\group 9.7M Jul 16 01:15  my_images
drwxrwx---+    8 local-user              AD-ELLERHOLD\group 4.0K Jul  2 13:11  my-data
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 ''$'\240\331''&'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 ''$'\300\234'\'''$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 ''$'\200\004''"'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K May 28 01:13 ''$'\320''_'$'\216\371''[U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:01 ''$'\020\226''<'$'\332\332''U'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 'VI$f'
drwxrwx---+    3 AD-ELLERHOLD\user AD-ELLERHOLD\group 4.0K Jun 12 01:00 ''$'\227''x'$'\373''e'

As you can see samba creates folders with random (binary?!) names. Sometime parts of correct paths are used (see dir "_images" instead of the correct dir "my_images").

Downgrading the fileserver back to 4.19 fixes this issue.

As far as Im aware, these directories can be safely deleted because there may be files in them, nothing is lost. In this instance every expected file is in "images", "my-data" and "domain.de". The files in the extra dirs are nonsense.

At first we thought its a problem with Windows clients, because shares that were access regularly by windows machines had the most problems, but the share above is ONLY used by another debian machine - mounted via cifs-utils! So only samba + cifs-utils may be the culprit here.

We use Debian 12 Bookworm with samba 2:4.20.2+dfsg-5~mjt-deb12 on the server and client side. For cifs-utils the version 2:7.0-2 is used (client side).

Does anybody have any clue whats happening here?

The smb.conf of the server:

[global]
     workgroup = AD-ELLERHOLD
     realm     = AD.ELLERHOLD.LAN
     dns proxy = no
     load printers           = no
     printing                = bsd
     printcap name           = /dev/null
     disable spoolss         = yes
     show add printer wizard = no
     panic action = /usr/share/samba/panic-action %d
     server role = member server
     netbios name = SERVER
     security = ADS
     winbind offline logon = yes
     idmap config * : backend = tdb
     idmap config * : range   = 3000-7999
     idmap config AD-ELLERHOLD:backend     = ad
     idmap config AD-ELLERHOLD:range       = 10000-99999
     idmap config AD-ELLERHOLD:schema_mode = rfc2307
     idmap config AD-ELLERHOLD:unix_primary_group = yes
     username map            = /etc/samba/user-map.conf
     winbind refresh tickets = yes
     dedicated keytab file   = /etc/krb5.keytab
     kerberos method         = secrets and keytab
     inherit permissions     = yes
     inherit acls            = yes
     map acl inherit         = yes
     template shell          = /bin/bash
     template homedir        = /home/AD-ELLERHOLD/%U
     vfs objects = catia fruit streams_xattr acl_xattr recycle
     fruit:metadata = stream
     fruit:veto_appledouble = no
     veto files = /.DS_Store/
     delete veto files = yes
     recycle:repository = Papierkorb
     recycle:keeptree = yes
     recycle:touch_mtime = yes
     recycle:directory_mode = 0770
     server min protocol = NT1
     ntlm auth           = mschapv2-and-ntlmv2-only
[my-share]
     force group = +AD-ELLERHOLD\group
     path = /var/storage
     read only = no
     recycle:exclude = *.* *

-- 
Senior Webentwickler
Datenschutzbeauftragter

Ellerhold Aktiengesellschaft
Friedrich-List-Str. 4
01445 Radebeul

Telefon: +49 (0) 351 83933-61
Web:www.ellerhold.de
Facebook:www.facebook.com/ellerhold.gruppe
Instagram:www.instagram.com/ellerhold.gruppe
LinkedIn:www.linkedin.com/company/ellerhold-gruppe  

Amtsgericht Dresden / HRB 23769
Vorstand: Stephan Ellerhold, Maximilian Ellerhold
Vorsitzender des Aufsichtsrates: Frank Ellerhold


---Diese E-Mail und Ihre Anlagen enthalten vertrauliche Mitteilungen. Sollten Sie nicht der beabsichtigte Adressat sein, so bitten wir Sie um Mitteilung und um sofortiges löschen dieser E-Mail und der Anlagen.

Unsere Hinweise zum Datenschutz finden Sie hier: http://www.ellerhold.de/datenschutz/

This e-mail and its attachments are privileged and confidential. If you are not the intended recipient, please notify us and immediately delete this e-mail and its attachments.

You can find our privacy policy here: http://www.ellerhold.de/datenschutz/




More information about the samba mailing list