Can't share folders on second drive [SOLVED]

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
User avatar
pfd27
Level 2
Level 2
Posts: 90
Joined: Sun Feb 15, 2015 11:13 am

Can't share folders on second drive [SOLVED]

Post by pfd27 » Thu Feb 25, 2016 10:15 pm

Hello

I built a computer to use for backups and serve some music/videos.
Mint 17.3 mate installed to sda1. sdb1 is a 3tb drive mounted as /media/Storage.

I setup samba using this tutorial. https://www.youtube.com/watch?v=dm0_9N3dY90
I also used the same tutorial to setup samba on a laptop running 17.3 mate as well.
I can see and access folders from the laptop just fine and I can access a shared folder on sda1
of the server, but can not access any folders on /media/Storage. All the permissions look the
same on all folders as far as I can tell, but I just can't make it share from the big drive.
Someone please help a noob :)

-smb.conf-
[global]
server string = Pfd27 Server
workgroup = WORKGROUP
netbios name = pfd27
security = user
encrypt passwords = yes
guest account = nobody
name resolve order = bcast host
include = /etc/samba/smbshared.conf

-smbshared.conf-
[Music]
comment = Pfd27 Server Music
path = /media/rob/storage/media/Music
browsable = yes
guest ok = yes
read only = yes
available = yes
public = no
writable = no
valid users = rob

[Videos]
comment = Pfd27 Server Videos
path = /media/rob/storage/media/Videos
browsable = yes
guest ok = yes
read only = yes
available = yes
public = no
writable = no
valid users = rob

[Backups]
comment = Pfd27 Server Backup
path = /media/rob/storage/backups
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes
valid users = rob

[Downloads]
comment = Pfd27 Server Downloads
path = /home/rob/Downloads
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes
valid users = rob

-fstab=
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=39f9124a-45b0-4487-ad19-7940f1fdb86c / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=74d8783c-e497-48cf-9eea-e93126e0b0e4 none swap sw 0 0
# /media/Storage is sdb1
UUID=7eb67084-2669-45e9-8d18-c6d7b3bab410 /media/Storage ext4 defaults 0 0
Last edited by pfd27 on Fri Feb 26, 2016 8:58 pm, edited 1 time in total.

all41
Level 15
Level 15
Posts: 5709
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't share folders on second drive

Post by all41 » Thu Feb 25, 2016 10:43 pm

3tb drive mounted as /media/Storage.
Did you use a capital for 'Storage'?
then all fstab references should also use a capital

User avatar
pfd27
Level 2
Level 2
Posts: 90
Joined: Sun Feb 15, 2015 11:13 am

Re: Can't share folders on second drive

Post by pfd27 » Thu Feb 25, 2016 11:00 pm

I noticed I didn't use a capital in the smbshared file just as I posted. I changed them all to Storage
and it is still doing it.

I should say that when I try to open the folder I get a "Unable to mount location" "Failed to mount Windows Share:No such file or directory: msg

all41
Level 15
Level 15
Posts: 5709
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't share folders on second drive

Post by all41 » Thu Feb 25, 2016 11:16 pm

After modifying smb.conf run:

Code: Select all

sudo mount -a
This will show errors in your fstab.
If it returns no errors and just returns to your command prompt
then your fstab will be in good shape.
I will refer you to this link where I was coached through the same:
viewtopic.php?f=46&t=154670#p802950
I refer back to this from time to time. But note that this was for ext4 partitions

altair4
Level 19
Level 19
Posts: 9755
Joined: Tue Feb 03, 2009 10:27 am

Re: Can't share folders on second drive

Post by altair4 » Fri Feb 26, 2016 8:11 am

Mint 17.3 mate installed to sda1. sdb1 is a 3tb drive mounted as /media/Storage.
but can not access any folders on /media/Storage.
Because none of your share definitions are pointing to anything on /media/Storage. They are all pointing to /media/rob/storage.

Totally irrelevant side note on the HowTo you are using: I'm not a big fan of making Samba more complicated than it already is so I would take exception to:

** Rewriting the default smb.conf that comes with a distribution.
** Making Samba work harder by using the "include" statement.
** Making Samba work harder by having a share definition that looks like this:
[Music]
comment = Linux File Server Share
path = /media/lou/Storage/Music
browsable = yes
guest ok = yes
read only = yes
available = yes
public = no
writable = no
valid users = lou

Samba will have to interpret that share definition because it has contradictory settings ( "guest ok = yes" yet "public=no" ) and redundant settings ( "read only = yes" and "writable=no" ). At the end of it's interpretation it will use this:
[Music]
comment = Linux File Server Share
path = /media/lou/Storage/Music
valid users = lou
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
pfd27
Level 2
Level 2
Posts: 90
Joined: Sun Feb 15, 2015 11:13 am

Re: Can't share folders on second drive

Post by pfd27 » Fri Feb 26, 2016 8:57 pm

Thanks for everyone’s help. I got the shares to so, but I feel like a idiot.

the biggest problem was I had the path to the folder wrong in the smbshared file :D

I can't see the shares from a windows computer, but thats for a different topic.

Post Reply

Return to “Other networking topics”