The context
From a Mac running Mountain Lion, a share "Multimedia" served by QNAP NAS is mounted as root via SAMBA in the Finder. Let's say I create a symbolic link of a directory on the NAS such as:
[/share/Multimedia] # ln -s /share/MD0_DATA/Multimedia/test/ ./folder/symlink
It works:
[/share/Multimedia] # ls -la folder
lrwxrwxrwx 1 admin administ 34 Oct 14 19:24 symlink -> /share/MD0_DATA/Multimedia/test//
I can also mv
and cp
files without problems to and from symlink
when logged on the NAS.
This is the situation on the client-side, a Mac running 10.8.2:
client:~ myself$ id
uid=501(myself) gid=20(staff) groups=20(staff),401(com.apple.access_screensharing),
12(everyone),33(_appstore),61(localaccounts),79(_appserverusr),80(admin),
81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer)
Strangely, the client doesn't recognize symlink
as such; it's a normal directory instead (please note that according to the output I have rwx
permissions):
client:folder myself$ ls -la
drwx------ 1 myself staff 16384 18 Okt 23:25 symlink
The same happens in the Finder, where the folder symlink
doesn't appear as an alias, but as a normal folder.
I can cd
into symlink
and I can also read files in it without problems. The same in the Finder.
The problem
If I try to write (mv
or cp
) a file into symlink
on the client-side, it fails:
client:folder myself$ mv test.txt symlink/
mv: rename test.txt to symlink/test.txt: No such file or directory
Likewise, any attempt to move or copy a file into symlink
via drag-n-drop in the Finder returns the following error:
The operation cannot be completed because one or more required items cannot be found. (Error code = -43).
(Moving/copying a file from symlink
to another location on the NAS works just fine.)
Here's the output of a write operation in the Terminal:
client:symlink myself$ touch text.txt
touch: text.txt: Permission denied
Interestingly, I can successfully delete files which are already present:
client:symlink myself$ ls -la
total 64
drwx------ 1 myself staff 16384 18 Okt 23:51 .
drwx------ 1 myself staff 16384 18 Okt 23:48 ..
-rwx------ 1 myself staff 5 18 Okt 23:51 text.txt
client:symlink myself$ rm text.txt
client:symlink myself$ ls -la
total 64
drwx------ 1 myself staff 16384 18 Okt 23:56 .
drwx------ 1 myself staff 16384 18 Okt 23:48 ..
I am really at loss on how to diagnose and solve this problem.
The relevant Apple kb states that Error -43 can have three causes:
- Illegal characters (none there)
- Permissions (permissions seem fine, see the
ls -la
output above. I mount the share with the admin account of the NAS and I am logged in as an admin on my Mac client.) - Non-existent share point (the share exists and works well otherwise)
Additional informations
Here's some more info for troubleshooting:
The global options in /etc/smb.conf
on the NAS are set as follows:
[global]
passdb backend = smbpasswd
workgroup = WORKGROUP
security = USER
server string =
encrypt passwords = Yes
username level = 0
map to guest = Bad User
null passwords = yes
max log size = 10
socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=65536 SO_RCVBUF=65536
os level = 20
preferred master = no
dns proxy = No
smb passwd file=/etc/config/smbpasswd
username map = /etc/config/smbusers
guest account = guest
directory mask = 0777
create mask = 0777
oplocks = yes
locking = yes
disable spoolss = yes
load printers = no
force directory security mode = 0000
veto files = /.AppleDB/.AppleDouble/.AppleDesktop/:2eDS_Store/Network Trash Folder/Temporary Items/TheVolumeSettingsFolder/.@__thumb/.@__desc/:2e*/
delete veto files = yes
map archive = no
map system = no
map hidden = no
map read only = no
deadtime = 10
use sendfile = yes
display charset = UTF8
unix extensions = no
store dos attributes = yes
client ntlmv2 auth = yes
dos filetime resolution = no
min receivefile size = 4096
case sensitive = auto
domain master = auto
local master = yes
inherit acls = yes
wide links = yes
follow symlinks = yes
wins support = no
force unknown acl user = yes
template homedir = /share/homes/DOMAIN=%D/%U
domain logons = no
The specific options:
[Multimedia]
comment = System default share
path = /share/MD0_DATA/Multimedia
browsable = yes
oplocks = no
ftp write only = no
public = yes
invalid users =
read list = @"everyone","gast"
write list = "admin","guest"
valid users = "root",@"everyone","admin","guest","gast"
inherit permissions = yes
The logs on the client's side don't say much:
/private/var/log/system.log
(which includes kernel.log since 10.8) shows up occasional entries like:
Oct 18 22:13:43 client kernel[0]: smb_iod_reconnect: Reconnected share MULTIMEDIA with server qnap-SAMBA._smb._tcp.local
And /private/var/log/samba/
doesn't exist on my system.
Any help is much appreciated.
ls -ld /share/MD0_DATA/Multimedia/test/
command result. So, what is the permission of the directory where the symlink points.drwxrwxrwx 2 admin administ 4096 Oct 19 21:12 test/
.ln -s /share/MD0_DATA/Multimedia/test/ etc.
seems to be the wrong syntax (note the trailing slash at the end). However,ln -s /share/MD0_DATA/Multimedia/test etc.
doesn't change the situation.cd /share/MD0_DATA/Multimedia/folder; ln -s ../test ./symlink
. Probably not helps, but haven't another idea and maybe a export somewhat messing up absolute paths by the client view...mv
andcp
files without problems to and fromsymlink
" and "If I try to write (mv
orcp
) a file intosymlink
, it fails" so I'm confused.