symbolic links

Roman S Dubtsov busa at
Sun Jan 4 14:14:23 GMT 2004


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:

unix extensions = yes
	guest ok = yes
	writeable = yes
	guest only = yes
	path = /tmp/foo

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 

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 // /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 
[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 
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