Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Samba share of my home directory set up as described here. On my Windows box I can access the share, open files and write to them. The server I am connecting to is an Ubuntu 12.04 VM running on Virtualbox.

In my home directory I have symlinked /var/www to ~/www:

charlesr@hicks:~$ ls -lad www
lrwxrwxrwx 1 charlesr charlesr 8 Jul 16 18:45 www -> /var/www

Even though the symlink is owned by me (charlesr), I cannot access it via Windows:

Windows network error

I've checked permissions on /var/www and that directory is part of the www-data group, which I am a part of:

charlesr@hicks:~$ ls -lad /var/www
drwxrwsr-x 3 root www-data 4096 Jul 16 18:13 /var/www

charlesr@hicks:~$ grep www-data /etc/group

So what am I missing here? Why can't I access this symlinked directory that my user has permission to read and write to? I'm new to Samba so I'm hoping it's something obvious.

share|improve this question
up vote 2 down vote accepted

Samba doesn't like symlinks for security reasons, and won't follow them unless you force it. Try adding

wide links = yes
unix extensions = no
follow symlinks = yes

to your smb.conf [GLOBAL] section and restart Samba. follow symlinks should already default to yes, but it won't hurt to set it again.

share|improve this answer
Thank you, that was it. I wanted to understand what these settings meant so a bit of searching yielded this helpful page from the manual: – Charles Roper Jul 19 '12 at 16:20
I am having the same issue, and on ubuntu server 10.10 this solves it for me, but on 12.04 the issue is persisting. My symlinks appear as unnavigable items like before I added the wide links = yes setting (to both the [global] section and [homes] section just to be sure). Any further ideas or places I can look to solve this? – Billy Moon Mar 3 '13 at 16:48
Did you sudo service smbd restart after the changes? I just tried it on Ubuntu 12.04.1 LTS and it still works for me. – charlesbridge Mar 4 '13 at 12:15
One note about this, it appears that unix extensions = yes HAS to be set in [GLOBAL]. It cannot be set only for an individual share. wide links and follow symlinks can be set only for individual shares just fine however. – Jake Wilson Oct 25 '13 at 19:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .