Unix клиенту нужно создать symlink внутри примонтированного cifs ресурса на свой локальный файл/каталог "вне этого ресурса".
Читал man smb.conf, в нем повстречал такие вот вещи:
Код: Выделить всё
...
unix extensions (G)
This boolean parameter controls whether Samba implements the CIFS
UNIX extensions, as defined by HP. These extensions enable Samba to
better serve UNIX CIFS clients by supporting features such as
symbolic links, hard links, etc... These extensions require a
similarly enabled client, and are of no current use to Windows
clients.
Default: unix extensions = yes
...
wide links (S)
This parameter controls whether or not links in the UNIX file
system may be followed by the server. Links that point to areas
within the directory tree exported by the server are always
allowed; this parameter controls access only to areas that are
outside the directory tree being exported.
Note that setting this parameter can have a negative effect on your
server performance due to the extra system calls that Samba has to
do in order to perform the link checks.
Default: wide links = yes
...
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.
This option is enabled (i.e. smbd will follow symbolic links) by
default.
Default: follow symlinks = yes
Код: Выделить всё
[global]
...
unix extensions = yes
[home]
...
wide links = no
follow symlinks = yes
Код: Выделить всё
zhykova@zhykova:~$ pwd && mount | grep home
/shares/samba/homes/zhykova
//pc0/home on /usr/shares/samba/homes/zhykova type cifs (rw,mand)
zhykova@zhykova:~$
Код: Выделить всё
zhykova@zhykova:~$ ln -s /tmp tmp
ln: создание символьной ссылки «tmp»: Отказано в доступе
zhykova@zhykova:~$
Код: Выделить всё
zhykova@zhykova:~$ ls -lah ~/ | grep tmp
ls: невозможно прочитать символьную ссылку /shares/samba/homes/zhykova/tmp: Отказано в доступе
lrwxrwxrwx 1 zhykova DomainUsers 4 2010-06-28 01:40 tmp
zhykova@zhykova:~$
смотрим на этот-же каталог на сервере:
Код: Выделить всё
[root@pc0 /usr/local/etc]# ls -lah ~zhykova | grep tmp
lrwxrwxrwx 1 zhykova DomainUsers 4B 28 июн 01:40 tmp -> /tmp
[root@pc0 /usr/local/etc]#
Внимание вопрос. Надо наоборот, чтобы симлинк куда надо казал на клиенте, а на сервере пусть будет как-получится. Т.е. необходимо, чтобы на клиентской машине симлинк ~zhykova/tmp указывал на /tmp клиентский. Кто-нибудь знает как это делается?