Results 1 to 10 of 10

Thread: Samba and External Drive

  1. #1
    Join Date
    Feb 2007
    Beans
    135

    Samba and External Drive

    I have been trying to share folders from my main PC which is running Ubuntu 10.04. I have been able to figure out Samba enough to get my a couple of folders shared, but I have been unable to share any folders which are on my external harddrive. After entering the path in my smb.conf file they appear on the network but I am unable to navigate to them. When trying to navigate to them through the network folder on the pc they are actually connected to I get an "Unable to mount location: Failed to mount windows share" dialog box. On the windows pc I am trying to share with I get, "Windows cannot acces \\Josh-Desktop\name of folder"

    My smb.conf file looks like this:

    [Home]
    comment = Home
    path = /home/josh
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

    [share]
    comment = Ubuntu File Server Share
    path = /srv/samba/share
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

    [Music]
    comment = Music
    path = /media/My\ Book/Music/
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

    [Videos]
    comment = Videos
    path = /media/My\ Book/Videos/
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

    That folders I cannot access are Music and Videos. What am I doing wrong?

  2. #2
    Join Date
    Feb 2005
    Location
    Oregon
    Beans
    496
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Samba and External Drive

    Does Samba need spaces to be backslashed in the paths in smb.conf? Maybe they need to be taken out. I don't know for sure either way.

  3. #3
    Join Date
    Feb 2007
    Beans
    135

    Re: Samba and External Drive

    Quote Originally Posted by dtfinch View Post
    Does Samba need spaces to be backslashed in the paths in smb.conf? Maybe they need to be taken out. I don't know for sure either way.
    Thanks for the reply. I took them out but still didn't have any luck.

    I also tried taking the entries out of the smb.conf file and right clicking the folder and sharing them. They showed up still, but I still couldn't access them. I got the same errors.

  4. #4
    Join Date
    Feb 2007
    Beans
    135

    Re: Samba and External Drive

    I've never actually done this, but would making an entry into fstb for my external harddrive make a difference?

  5. #5
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Samba and External Drive

    It's likely a linux permissions problem not a samba problem.

    The external drive will automount with you as owner and read write permissions to you and you alone. So samba says the remote guest can access the share but linux permissions says guests ( i.e., "others" ) cannot. A simple fix in this case is to add a "force user" to the share definitions:

    [Music]
    comment = Music
    path = /media/My\ Book/Music/
    browsable = yes
    guest ok = yes
    read only = no
    force user = josh
    create mask = 0755

    [Videos]
    comment = Videos
    path = /media/My\ Book/Videos/
    browsable = yes
    guest ok = yes
    read only = no
    force user = josh
    create mask = 0755

    I'm assuming your user name is josh.

    Force user will act as a mask converting the remote user to josh as far as that share is concerned.

  6. #6
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Samba and External Drive

    I also tried taking the entries out of the smb.conf file and right clicking the folder and sharing them. They showed up still, but I still couldn't access them. I got the same errors.
    I missed that when I read your posts. That's Nautilus-share. If you recreate the Classic-shares above with the force user line included don't forget to "unshare" the Nautilus-shares - since the two will then conflict with each other..

  7. #7
    Join Date
    Feb 2007
    Beans
    135

    Re: Samba and External Drive

    Quote Originally Posted by Morbius1 View Post
    I missed that when I read your posts. That's Nautilus-share. If you recreate the Classic-shares above with the force user line included don't forget to "unshare" the Nautilus-shares - since the two will then conflict with each other..
    Thank you so much for the responses. I am at work now so I am unable to test your solution but will do so first thing tonight and report back.

  8. #8
    Join Date
    Feb 2007
    Beans
    135

    Re: Samba and External Drive

    I added "force user = josh" exactly as stated to no luck...Any other ideas?

  9. #9
    Join Date
    Feb 2007
    Beans
    135

    Re: Samba and External Drive

    I finally got it working. It seems as though it was a mixture between leaving out the backslashes and the force user. Thanks to both of you!!

  10. #10
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Samba and External Drive

    Sorry about that. Post the output of the following commands please:

    Code:
    net usershare info
    sudo net usershare info
    testparm -s
    ls -al /media/"My Book"
    EDIT: Never mind

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •