Matthias Kühne | Ellerhold Aktiengesellschaft
2024-Jul-17 07:54 UTC
[Samba] Weird folders / files after upgrading to Samba 4.20
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/
Michael Tokarev
2024-Jul-18 09:52 UTC
[Samba] Weird folders / files after upgrading to Samba 4.20
17.07.2024 10:54, Matthias K?hne | Ellerhold Aktiengesellschaft via samba wrote:> Hello lovely samba-people,Hi! :)> 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'This looks like a listing from linux side, - is this a local linux filesystem view?> 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.What do you mean "fixes" ? Are the "wrong" files disappear when downgrading? Do you know when these files gets created?> 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?Not yet, I for one has never seen anything like this before. Thanks, /mjt -- GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt