LinHES Forums
http://forum.linhes.org/

SOLVEDHow do I set up KM to write to file server with samba?
http://forum.linhes.org/viewtopic.php?f=5&t=17030
Page 1 of 1

Author:  cahlfors [ Sat Oct 20, 2007 2:21 am ]
Post subject:  SOLVEDHow do I set up KM to write to file server with samba?

Failing to use MythArchive to my file server, I realized that it can only write there when logged in as root, not mythtv. The smb directories are owned by root/root when viewed from the KM box, but are world writable as seen from the file server.

The line from /etc/fstab:
Code:
//server/sdc /mnt/server/sdc smbfs username=fileuser,password=secret 0 0

...which is supposed to log me in as "fileuser" on the file server, owning the directory. Yet, I can't write. :?

Oh, yes. /etc/mtab:
Code:
//server/sdc /mnt/server/sdc smbfs rw 0 0


Could anyone point me in the right direction?

Cheers,
/Chris

Author:  mad_paddler [ Sat Oct 20, 2007 4:47 am ]
Post subject: 

Try changing the owner of /mnt/server/sdc to mythtv

Author:  cahlfors [ Sat Oct 20, 2007 4:56 pm ]
Post subject: 

Permission denied.
Same goes if I try to make it world writable. Current permissions are u=rwx,g=rx,o=rx and owner is root/root. Sigh.
This is when viewed from the KM box.
From the file server itself the permissions are rwx for everybody and owner is "fileuser".
I don't have user "mythtv" on the file server.

Cheers,
/Chris

Author:  mad_paddler [ Sat Oct 20, 2007 5:40 pm ]
Post subject: 

Make sure its not mounted when you try and change the owner. Also you were root when you tried weren't you?

Author:  cahlfors [ Wed Oct 24, 2007 11:38 am ]
Post subject: 

Quote:
Also you were root when you tried weren't you?

Yes.
Quote:
Make sure its not mounted when you try and change the owner.

Hm. If it's not mounted, I can't reach it to change ownership. However, I can change ownership for /mnt/server/sdc to mythtv/mythtv and add write permissions for all. When I mount again, the ownership then changes to root/root and only owner has write permissions.

The schoolbook doesn't quite explain the mount command that far, but I think there is something in my /etc/fstab that makes it mount the directory as root and with o=rwx,g=rx,o=rx permissions?

Cheers,
/Chris

Author:  Girkers [ Wed Oct 24, 2007 3:45 pm ]
Post subject: 

You should be able to change the permissions of the mount point whilst the share is not mounted.

Author:  slowtolearn [ Wed Oct 24, 2007 4:48 pm ]
Post subject:  Re: How do I set up KM to write to my file server with samba

cahlfors wrote:
Failing to use MythArchive to my file server, I realized that it can only write there when logged in as root, not mythtv. The smb directories are owned by root/root when viewed from the KM box, but are world writable as seen from the file server.
What does your smb.conf file on the fileserver look like? Are you allowing guest access to the share(s)?

Author:  cahlfors [ Thu Oct 25, 2007 12:13 pm ]
Post subject: 

Quote:
What does your smb.conf file on the fileserver look like? Are you allowing guest access to the share(s)?

The file server does not allow guest access - only user "fileuser". It's being accessed from other Linux and Windows boxes successfully (although it was a brain damaging experience to make it work...:lol:).

Quote:
You should be able to change the permissions of the mount point whilst the share is not mounted.

Yes, that's what I did here:
Quote:
However, I can change ownership for /mnt/server/sdc to mythtv/mythtv and add write permissions for all. When I mount again, the ownership then changes to root/root and only owner has write permissions.

The mount point is /mnt/server/sdc. The reason for my confusion was that I was working farther down the tree, i e below the mount point.

Since Samba shares its stuff properly on the server, I assume the error is in the mount command on the KM box?

Cheers,
/Chris

Author:  slowtolearn [ Thu Oct 25, 2007 12:42 pm ]
Post subject: 

cahlfors wrote:
Quote:
What does your smb.conf file on the fileserver look like? Are you allowing guest access to the share(s)?

The file server does not allow guest access - only user "fileuser". It's being accessed from other Linux and Windows boxes successfully (although it was a brain damaging experience to make it work...:lol:).
Then you probably want to man smbmount, looking for the uid= and gid= options.

You could also compare your mount directive to your other Linux boxen's...

Author:  Girkers [ Thu Oct 25, 2007 9:51 pm ]
Post subject: 

You haven't mentioned what sort of server you have, but have you considered using NFS alongside Samba for your windows clients?

Author:  cahlfors [ Fri Oct 26, 2007 1:38 pm ]
Post subject: 

Quote:
Then you probably want to man smbmount, looking for the uid= and gid= options.


Aha, so my /etc/fstab line is actually calling smbmount and not mount! Trying the uid/gid options does solve the problem! Thank you Slowtolearn! :D This will prove useful!

I haven't quite figured out how my Ubuntuboxes use Samba. Typing "mount" at the command line doesn't return anything useful although a file browsing window is open for the file server. Wonder how that works:?:

Thanks all for rushing to my assistance!

Cheers,
/Chris

Author:  mudguts [ Fri Oct 26, 2007 2:11 pm ]
Post subject: 

Hi Chris

What command are you using to while attempting to mount folders on your Ubuntu box. Also, try NFS rather than Samba for mounting Linux shares.

Cheers

Mick

Author:  Girkers [ Fri Oct 26, 2007 4:33 pm ]
Post subject: 

You will also find NFS is faster than SAMBA.

Author:  cahlfors [ Sun Oct 28, 2007 2:08 pm ]
Post subject: 

Quote:
What command are you using to while attempting to mount folders on your Ubuntu box.

Well, Ubuntu is a little different in many aspects and this is one of them. I don't explicitly mount anything at all. I just use the file browser and bookmark my server. I have no idea of what's happening behind the scenes. It could be LinNeighborhood. As has been said by so many - Ubuntu just works! Perfect for the noobs, maybe a little frustrating for the people who want to be in control.
Personally, I have so many battles to fight that I appreciate its simpleness and lack of issues and plan to migrate everything else to Ubuntu. Maybe even the file server, but not KM, of course!

Quote:
Also, try NFS rather than Samba for mounting Linux shares.

I'm not currently inclined to try, since the advice I got is not that convincing. I would much prefer to use one method for all my systems and try to do that well. That means investing more time into Samba. Learning NFS would steal some of that time.

Thanks again!

/Chris

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/