From: Paulo Alcantara <pc@manguebit.org>
To: Ralph Boehme <slow@samba.org>,
Matthew Richardson <m.richardson@ed.ac.uk>
Cc: samba@lists.samba.org, CIFS <linux-cifs@vger.kernel.org>,
Steve French <smfrench@gmail.com>
Subject: Re: [Samba] SMB3 Unix Extensions - creating special files
Date: Thu, 31 Jul 2025 15:00:49 -0300 [thread overview]
Message-ID: <11e6d17f181c57ee7113eb18f3f37419@manguebit.org> (raw)
In-Reply-To: <notmuch-sha1-71ace0e0808cb1155c98f212b8406ee293b20f11>
Paulo Alcantara <pc@manguebit.org> writes:
> Ralph Boehme <slow@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@fed:~# mount.cifs //192.168.124.1/test /mnt/1 -o username=testuser,password=foo-123,unix
> root@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@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'.
Looks like a regression caused by
6c06be908ca1 ("cifs: Check if server supports reparse points before using them")
By mounting the share again with 'unix,symlink=native,nonativesocket'
and getting rid of this check in cifs_symlink()
if (le32_to_cpu(pTcon->fsAttrInfo.Attributes) & FILE_SUPPORTS_REPARSE_POINTS)
I was able to create symlink and socket:
root@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)
total 0
brwxrwxrwx 1 root fsgqa 3, 4 Jul 31 14:51 blk
crwxrwxrwx 1 root fsgqa 2, 1 Jul 31 14:51 chr
prwxrwxrwx 1 root fsgqa 0 Jul 31 14:51 fifo
lrwxrwxrwx 1 root fsgqa 2 Jul 31 14:51 l0 -> f0
srwxrwxrwx 1 root fsgqa 0 Jul 31 14:51 sock
prev parent reply other threads:[~2025-07-31 18:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1124e7cd-6a46-40a6-9f44-b7664a66654b@ed.ac.uk>
[not found] ` <7082aea3-b28b-4ef5-9b5c-64d5d8b78cbc@samba.org>
[not found] ` <a4a32c8e-3b7f-4748-8c50-48f18e8980b9@ed.ac.uk>
2025-07-31 16:12 ` [Samba] SMB3 Unix Extensions - creating special files Ralph Boehme
2025-07-31 16:18 ` Steve French
2025-07-31 17:37 ` Paulo Alcantara
2025-07-31 18:03 ` Matthew Richardson
2025-07-31 18:15 ` Paulo Alcantara
[not found] ` <CAH2r5mt_9GcPqg+v9QLXEroKJ9RQZ1MwtpPgprU+xHOSksiWqw@mail.gmail.com>
2025-07-31 19:24 ` Matthew Richardson
2025-07-31 20:00 ` Paulo Alcantara
2026-03-02 15:09 ` Matthew Richardson
2026-03-03 0:41 ` Nikkos Svoboda
2026-03-03 1:13 ` Jeremy Allison
2026-03-03 2:29 ` Jim DeLaHunt
2025-07-31 19:59 ` Paulo Alcantara
2025-07-31 19:20 ` Ralph Boehme
2025-07-31 19:55 ` Paulo Alcantara
[not found] ` <notmuch-sha1-71ace0e0808cb1155c98f212b8406ee293b20f11>
2025-07-31 18:00 ` Paulo Alcantara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11e6d17f181c57ee7113eb18f3f37419@manguebit.org \
--to=pc@manguebit.org \
--cc=linux-cifs@vger.kernel.org \
--cc=m.richardson@ed.ac.uk \
--cc=samba@lists.samba.org \
--cc=slow@samba.org \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox