Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

/media/MYDISK is where my hard drive is mounted automatically. I created a symlink using:

ln -s /media/MYDISK /home/camilo/MYDISK
chmod 777 /home/camilo/MYDISK

I'm setting up smb.conf like this:

[myshare1]
comment = external disk
browsable = yes
path = /home/camilo/MYDISK
guest ok = yes
read only = no
create mask = 0775

Also, in the [global] section I tried adding the following lines:

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

The problem is that when browsing the shared folder in Windows 7, I get a "\\etc\myshare1 is not accessible" error. When pointing the path to a regular folder it works fine. Also, when I point it directly to /media/MYDISK, it shows the same error.

EDIT: to make it more interesting, I have no graphical interface, so I need to touch the config files directly..

share|improve this question
    
Have you tried shares-admin? It comes with the system and works pretty well as far as writing the samba config. –  marcusw Jan 7 '11 at 20:32

4 Answers 4

edit /etc/samba/smb.conf to include force user = yourLogin in the [global] section

from this thread, worked for me:

http://ubuntuforums.org/showthread.php?t=1710811

share|improve this answer

You could also try using webmin to configure your share. It will give you a web-based interface to which you can connect and easily configure many aspects of your server:

What is Webmin?

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin, or check out the screenshots.

share|improve this answer

I had the same problem, and I resolved it by mounting the external drive manually with my user (i.e. not root).

share|improve this answer

The symlink:

ln -s /media/MYDISK /home/camilo/MYDISK

should already have 777 permissions, so no need for:

chmod 777 /home/camilo/MYDISK

although you may need to adjust the permissions of /media/MYDISK directly.

And in the samba share block directly use:

path = /media/MYDISK

instead of:

path = /home/camilo/MYDISK

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.