14

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

1
  • Have you tried shares-admin? It comes with the system and works pretty well as far as writing the samba config.
    – marcusw
    Jan 7, 2011 at 20:32

4 Answers 4

10

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

1
  • And restart service service smbd restart
    – e-info128
    Feb 24, 2017 at 13:29
2

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.

0

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

0

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

You must log in to answer this question.

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