Kodi Community Forum

Full Version: [LIVE] Samba Server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Having issues setting up a samba server under XBMCLive.

My setup:
XBMCLive installed on an 8GB USB stick
2TB internal SATA disk to store media on.
I have the 2TB disk mounted on /share
fstab entry: /dev/sdc1 /share ntfs-3g defaults 0 0

smb.conf:
[share]
path = /share
guest ok =yes
read only = no

Now my win7 box can see the share and access files on it. However when I try to push any kind of file to it windows reports that there is not enough free space. df reports 1.2TB free space.

After a bit of googling I found an issue where someone said that they fixed the issue by commenting out a line in the global section of smb.conf that read: "min receivefile size=128k".

I figured I would take the entire posted smb.conf and edit the share to reflect my own needs. Again I got the same issue of not enough free space. I decided to try and uncomment that line and finally, I could transfer files. After trying to play the movie failed, I ran an md5sum and got different results on the win7 and XBMC box. The file was corrupted during transfer.

tl;dr samba is either reporting a full disk or corrupting the transfers. See above configs.

Any ideas?
Sounds like it's more of a permissions issue.

Change -
[share]
path = /share
guest ok =yes
read only = no

to
[Share]
comment = Share
path = /
force user = root
inherit permissions = yes
read only = no
guest ok = Yes

Some places will still be owned by root and you will not be able to move certain things. Most should though, it's the setting I use for Windows <-> Linux and works great.

Note -
Giving the 'path' as '/' means you can access the system root directory instead of just the 'share' folder in Linux.

The way I have it is my drives are connected to Windows PC, but mounted to Linux using Network Drive shares (smbfs).
The settings I used to access my drives from the linux system are explained in this thread.
Tried those settings with no luck. Still getting the full disk error.

Interestingly, I just tried pushing a file from my droid to the share without issue. Seems to be windows7 screwing it up.....
AFAIK -
Windows will not know the size of the drive through the network if it's connected to Linux, Linux does not natively support NTFS.

My setup is different to yours, if your using NTFS, you are better off connecting the drive to Windows because Windows will understand it. If you need to connect it to linux, you should really reformat it to EXT4 IMO, but that may not solve the problem.

Shared from Linux using Samba share, Windows will be able to copy files to it and Linux will read/write to it.

Here is a screenshot of how my network looks/works -
Notice all the drives in Windows (on left) are shared NTFS drives and then mounted to /mnt in Linux on the right.

All files systems are different - all Samba shares are treated the same (universal). Wink

Image
Yep that's exactly what I'm afraid of. I don't really want to transfer everything off the drive, reformat, then put it all back if it's not going to solve the problem. That's a 2 day project with my limited spare time.

Also if for any reason I decide to go back to windows to serve out the files, I would need to do it all over again. I prefer to stay with linux for this and XBMCLive in particular, so I can setup a XBMC server to do file sharing, shared library through mysql, and rtorrent to do all the downloading. All while being a player for my TV in the bedroom.

Maybe a separate issue but /dev/sdc changes the drive its mapped to randomly on reboots. I have a few disks in the machine that I plan on pulling out when I get this all sorted. One is a XP install I wanted to get away from. Sometimes it maps as sdc....
XBMCLive should automatically mount your drives (any USB drive) to the /media folder...

That not the case?
I had similiar issues with win7 not reporting the correct size of the shares but fixed it by having this at the top of my smb.conf, try this conf and see if it helps (assumes xbmc as user and that the drive has been chown'd for xbmc to read / write


[global]
workgroup = WORKGROUP
netbios name = XBMC <----------- change to your computer name (XBMCLive ?)
security = SHARE
auth methods = guest
domain master = No
wins support = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192$
name resolve order = hosts wins bcast
syslog = 1
syslog only = yes

[share]
comment = share
path = /share
force user = xbmc
inherit permissions = yes
read only = No
guest ok = Yes

That SHOULD now display the mounted share correctly over samba and allow you to read / write to it. This functions exactly the same on my 12 samba shares across 3 systems.
@DejaVu USB drives mount automatically but sata/ide drives do not. Is this unexpected behavior? I remember earlier versions of Ubuntu (edgy?) auto mounting all drives, but newer releases don't seem to do it anymore.

@danz0l thanks for the help but your configs give me the same result. Entire drive shows "bob" as the owner. I changed that line in the config. I also tried "force user = root" with no luck. I am able to write to /etc/samba from the share on my windows box, so I don't see this as a permission issue.

I noticed this in your example config
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192$

Is that $ supposed to be on the end? I know that connectbot ssh from my droid puts a $ at the edge of the screen when the line is too long to be fully displayed in nano. Any chance of something similar?
Your right, sorry Smile it has been truncated

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
Unfortunately it didn't matter, still not working.

I mapped the drive and windows is showing the correct free space. I was even able to make a new folder on the drive, create a blank text document in it. Edit that document, and save it all from windows explorer and notepad.

I just cant push files from windows....

after a bit more testing I could push files from a Ubuntu virtual machine and from my android phone, the md5's match. I can NOT push files from my native win7 install or a win7 virtual machine.
Thats very strange as my laptop is win7 and I push files from it to the ubuntu shares regularly
Just figured I would post my results in case someone else ran into this issue.

I reformatted ext3 and all works well.

I was also getting issues with transmission-daemon failing with "operation not supported" and reformatting fixed that as well.

I still think some setting could be changed to make it work, but I'm not touching it. All works as I want. Big Grin