Samba Share Issue with Mounted Drive


2 posts
by Kayot » Mon Jan 07, 2013 4:48 am
So after using my pi as a media server I decided that I wanted a non-redundant system more then a secondary system to a ps3. So for about half a month the pi sat on my desk until one fateful day (it was Thursday and I was board.) I was sorting my legal torrents, wishing I could turn my computer off and save the 400ish watts the beast burns when idle*. - * I have no idea how much it burns, but it's way more than a full load pi. So I went about the process of turning it (the pi) into a headless server and learning way more about Linux then I ever intended to.

I put Deluge and Deluge Web UI on it after I Canola'd youtube for idea's about how I'd go about random time killing tasks regarding torrents and a headless server. I got putty running etc. It was all going great... then Samba happened. And that's why I'm here.

I'm able to share a directory on the Host SD card without a problem. I do have to chmod it [the directory] to 775, but I can Read/Write it without a problem. The problem comes when I try to share Directories on a mounted drive. In this case, it's a 320GB WD Harddisk. I'm running it through a Powered USB Hub (I also tried with a jumpdrive hooked to the unit.) I tried to use it first as a Fat32, then as a ext4.

Here's my current fstab. I also tried to mount it under defaults. When it was a fat32, I used vfat. The partition in question is the first one on it's device. It's the sda1 in the list. I named the directory I mounted it to as sda1 since I can't remember anything... at all.
Code: Select all
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
/dev/sda1       /mnt/sda1       ext4    rw,auto,user      0       0


I'm pretty sure it's a problem with my Samba configuration:
Code: Select all
[global]
workgroup = MAINFRAME
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
security = share

;[homes]
;comment = Home Directories
;browseable = no
;read only = no
;create mask = 0775
;directory mask = 0775
;valid users = %S

[Torrents]
comment = Torrent Data
path = /mnt/sda1
read only = no
writeable = Yes
;only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes


[Test]
comment = Test
path = /media/test
read only = no
writeable = Yes
;only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes


The Test share works fine. I can read/write though I did have to chmod the test folder. I chmod the other folders both manually and using a -r on chmod but all I can do is read. It's all quite infuriating.

So, what am I doing wrong?
Posts: 3
Joined: Mon Oct 15, 2012 9:21 pm
by Kayot » Mon Jan 07, 2013 8:35 pm
After extensive fiddling with this problem (and breaking my install), I reinstalled Linux. I had the same problem, though all the sh scripts I made basically set the system up for me without any work on my part.

I started using Midnight Commander and for no reason what-so-ever I decided to use mc to do a chmod. Apparently using "sudo chmod 777 dir-name" in terminal wasn't taking on usb. Now it works. So in short, using mc solved the problem. Figuring out why is going to be a personal quest.

Please close this topic.
Posts: 3
Joined: Mon Oct 15, 2012 9:21 pm