Matthew Richardson
2025-Jul-31 18:03 UTC
[Samba] SMB3 Unix Extensions - creating special files
Thanks for spotting this. I can confirm that I see different behaviour with different kernels: 6.13.0 - mkfifo and ln-s work as expected. 6.14.0 - mkfifo works, ln-s gives 'operation not supported'. >=6.15.7 - both give 'operation not supported'. Which implies possibly more than one regression? Thanks, Matthew On 31/07/2025 18:37, Paulo Alcantara wrote:> [You don't often get email from pc at manguebit.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > Ralph Boehme <slow at samba.org> writes: > >> ...adding linux-cifs and Steve to the loop.... >> >> Looks to be a client issue: the client is checking for existence of the >> targets, the server returns ENOENT and then that's it. There no attempt >> to create either a symlink nor the fifo as reparse points. >> >> @Steve: any idea of what could be going wrong? Iirc this is supposed to >> be working in the client. > > With Linux v6.16 and samba master (f1a828016921): > > root at fed:~# mount.cifs //192.168.124.1/test /mnt/1 -o username=testuser,password=foo-123,unix > root at fed:~# mount -t cifs > //192.168.124.1/test on /mnt/1 type cifs (rw,relatime,vers=3.1.1,cache=strict,upcall_target=app,username=testuser,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.124.1,file_mode=0755,dir_mode=0755,soft,posix,posixpaths,serverino,reparse=nfs,nativesocket,symlink=unix,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1) > root at fed:~# (cd /mnt/1; rm -rf *; mknod chr c 2 1; mknod blk b 3 4; mknod fifo p; ln -s f0 l0; python -c "import socket as s; sock = s.socket(s.AF_UNIX); sock.bind('sock')"; ls -lh) > ln: failed to create symbolic link 'l0': Operation not supported > total 0 > brwxrwxrwx 1 root fsgqa 3, 4 Jul 31 14:31 blk > crwxrwxrwx 1 root fsgqa 2, 1 Jul 31 14:31 chr > prwxrwxrwx 1 root fsgqa 0 Jul 31 14:31 fifo > -rwxrwxrwx 1 root fsgqa 0 Jul 31 14:31 sock > > I see a regression when attempting to create symlinks and sockets. Note > the 'nativesocket' and 'symlink=unix' options, which are definitely > wrong for SMB3.1.1 POSIX mounts. It should have 'symlink=native' and > 'nonativesocket'.-------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 203 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20250731/cfa3a928/OpenPGP_signature.sig>
Paulo Alcantara
2025-Jul-31 18:15 UTC
[Samba] SMB3 Unix Extensions - creating special files
Matthew Richardson <m.richardson at ed.ac.uk> writes:> Thanks for spotting this. I can confirm that I see different behaviour > with different kernels: > > 6.13.0 - mkfifo and ln-s work as expected. > 6.14.0 - mkfifo works, ln-s gives 'operation not supported'. > >=6.15.7 - both give 'operation not supported'. > > Which implies possibly more than one regression?Yes. It used to work on older kernels because the client used to create special files with NFS reparse points by default, which is required for SMB3.1.1 POSIX mounts. 6c06be908ca1 ("cifs: Check if server supports reparse points before using them") then added a check for FILE_SUPPORTS_REPARSE_POINTS, which breaks against samba because it isn't set. IOW, we should skip this check for SMB3.1.1 POSIX mounts.