symbolic links
Roman S Dubtsov
busa at gorodok.net
Sun Jan 4 14:14:23 GMT 2004
Hello.
I've got the following question about symlinks. With unix extensions =
yes on server side and with extended smbfs on client side i'm able to
create symlinks. BUT: suppose the following setup:
<smb.conf>
---cut----
unix extensions = yes
---cut----
[foo]
guest ok = yes
writeable = yes
guest only = yes
path = /tmp/foo
---cut---
directory /tmp/foo has "subdir" bar and file "foobar". files mode is
666, directory --- 777.
# ls /tmp/foo/*
-rw-r--r-- 1 busa busa 0 Янв 4 18:53
/tmp/foo/foobar
/tmp/foo/bar:
total 8
drwxr-xr-x 2 busa busa 4096 Янв 4 18:53 .
drwxr-xr-x 3 busa busa 4096 Янв 4 18:53 ..
the share is mounted.
# mount //127.0.0.1/foo /mnt/foo -o guest,rw
so this what I have when trying to create links _inside_ mounted share
[busa at s-prime 21:46:56 ~]$ cd /mnt/foo/bar
[busa at s-prime 21:46:58 /mnt/foo/bar]$ ln -s ../foobar foobar-symlink
ln: creating symbolic link `foobar-symlink' to `../foobar': Permission
denied
[busa at s-prime 21:47:07 /mnt/foo/bar]$ ln ../foobar foobar-hardlink
[busa at s-prime 21:47:13 /mnt/foo/bar]$ ln -s /foobar foobar-symlink
[busa at s-prime 21:48:20 /mnt/foo/bar]$ ls -lA
total 0
-rw-rw-rw- 1 root root 0 Jan 4 21:44
foobar-hardlink
lrwxrwxrwx 1 guest nogroup 6 Jan 4 21:47 foobar-symlink
-> foobar
So one can create hardlinks with "../" but not symlinks and some
symlinks... which do pass trans2.c:ensure_link_is_safe...
Best regards.
--
Roman S Dubtsov
xmms plays: Red Hot Chili Peppers/1995 - One Hot Minute/02 - Aeroplane
More information about the samba-technical
mailing list