Re: With smb1 unix extensions gone, any way to export existing symlinks to Linux clients as symlinks?
Ralph Boehme via samba <[email protected]> Mon, 27 Apr 2026 16:05:05 +0200
| Newsgroups | gmane.network.samba.general |
|---|---|
| Message-ID | <[email protected]> |
On 4/27/26 2:59 PM, Dr. Thomas Orgis wrote: > Am Mon, 27 Apr 2026 11:46:09 +0200 > schrieb Ralph Boehme <[email protected]>: > >> On 4/27/26 10:34 AM, Dr. Thomas Orgis via samba wrote: >>> Or is there some sane way to get read-only 'real' symlinks exported to >>> clients with current samba? >> >> this should just work. Existing symlinks on the server should be seen as >> symlinks by the client (via reparse points on the wire). > > Oh? That would be cool. This means I'm doing something wrong. maybe just too old version of Samba and/or kernel. It works here with Samba master and kernel 6.17. Samba versions starting with 4.24 should be fine. Older kernels had issue. root@inti:/home/slow# grep '\[test\]' -A2 /opt/samba/etc/smb.conf [test] path = /srv/samba/test root@inti:/home/slow# ls -l /srv/samba/test/posix/ total 4 crw-r--r--. 1 root root 1, 2 28. Mär 16:24 char -rw-r--r--. 1 slow slow 0 27. Apr 15:45 file lrwxrwxrwx. 1 slow slow 26 27. Apr 15:45 link -> /srv/samba/test/posix/file POSIX should be automatically negotiated between client and server if the client requests it with -o posix. root@inti:/home/slow# mount.cifs //localhost/test /mnt/foo/ -o username=slow,password=x,posix root@inti:/home/slow# ls -l /mnt/foo/posix/ total 4 crw-r--r--. 1 root root 1, 2 28. Mär 16:24 char -rw-r--r--. 1 root slow 0 27. Apr 15:45 file lrwxrwxrwx. 1 root slow 4 27. Apr 15:45 link -> file > I did not have an option pertaining to that in smb.conf, as the > documentation / info I could find did not suggest that this kind of > read-only symlinks works. Specifically > > follow symlinks (S) > > This parameter allows the Samba administrator to stop smbd(8) from > following symbolic links in a particular share. Setting this > parameter to no prevents any file or directory that is a symbolic > link from being followed (the user will get an error). This option > is very useful to stop users from adding a symbolic link to > /etc/passwd in their home directory for instance. However it will > slow filename lookups down slightly. Iirc this is basically ignored when POSIX is negotiated. -slow -- SerNet Samba Team Lead https://sernet.de/ Samba Team PLC https://samba.org/ Support and Development https://samba.plus/services/ SAMBA+ packages https://samba.plus/products/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEE+uLGCIokJSBRxVnkqh6bcSY5nkYFAmnvbREFAwAAAAAACgkQqh6bcSY5nkZM 2BAAwhTXnTY9WKcOGbuvLj+7UiVOMCVc3Q2I1ju42hWPxKJY6Ow7L7GnPMyO4ii7J8pA8EIwVsab jrCm1RuY3rAvaQG950jIuck/lQ0Vx0D/JPdDbpzml3G6GiVIjAmtg5+hSFzMoZwB8zT6kbYhHqCV 4IVaen1FwILIyupW7lybFn5eVglUhfFKp70sJfWwfi/XYWyD5gXVyAs2xzUhI4Sl+mSNgjSVheCv F6gdIKurAryfGewP29If7eEtOGUWvDOrD/sxjbjM4ex2jE2spS1dscjYJ25FXJpaYwHF9n5aCjKB +yqdbkYJc3E6HZqIb23exqAzfnY8h+UctdCGbNxet0UBUbla1SGSqvQC5aKH20WpmkbMVcgpkgSS /NLqT9ZzDmWeR73h8hMRx1f2dIU1MeHb1hgXDQBjD6C1qX9aOE7/T7R+KS+BDMbDrAtD10hTPjd7 3xob2rckSKQhUDbVrdo66RPwWCn/izvX5kURJyv/L7BwC1QDztCFEtg/EY5gTHDcPOI++VqAG9SQ 49Q57ksbIZR34oIayGCbdR86SfWudhHZ4w6E9OLosjooA+mpTs7EhXEtXyEFgkrHJr4oI2H0xlc+ YKgJtOuF3SOQPt4HIehPdQftqhn+tIqEiz+QaNC8/lAfyRp8ncVg2mMhM5Tl/2bWz6d1iUhuZzwA h4E= =sr9s -----END PGP SIGNATURE-----