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

samba permissions issue w/ my mount confusion [solved]
http://forum.linhes.org/viewtopic.php?f=6&t=19362
Page 1 of 1

Author:  graysky [ Tue Dec 23, 2008 5:13 pm ]
Post subject:  samba permissions issue w/ my mount confusion [solved]

I have my KM box with the standard KM samba sharing /myth read/write.

I have a Debian/Lenny box and use the following script to mount my /myth on demand:

Code:
sudo mount -t cifs -o credentials=/root/.smbcredsmyth //mythtv/myth ~/myth


The .smbcredsmyth simply contains:
Code:
username=mythtv
password=mythtv


It does a great job mounting. What's odd is when I attempt to copy files to it, I get permission denied. That said, I am able to copy the files through Gnome just fine (smb://mythtv/myth). Can someone venture a guess what I'm doing wrong?

Here is the output of mount:
Code:
//mythtv/myth on /home/user/myth type cifs (rw,mand)

Author:  cahlfors [ Thu Dec 25, 2008 5:41 am ]
Post subject: 

I learned the hard way that I want to use the smbmount command rather than mount. Here's my /etc/fstab line on my mythbox:
//SCOOBYDOO/data /mnt/SCOOBYDOO/data smbfs lfs,username=mythtv,password=mythtv,uid=mythtv,gid=mythtv 0 0

Obviously, your way of having the credentials in a separate file is much safer.
"lfs" is a good option for large files and I suppose the uid and gid stuff may be what you're after?

Cheers,
/Chris

Author:  graysky [ Sat Jan 31, 2009 11:32 am ]
Post subject: 

Ahh... the solution is to add uid and gui fields to my user on the "workstation" box to the mount commend:

Code:
$ mount -t cifs -o credentials=/root/.smbcredsmyth,uid=1001,gid=1001 //mythtv/myth ~/myth


Now I am able to read/write to the share through the filesystem just fine. The key here is that my user on the workstation is NOT 'mythtv' and somehow, when omitting the uid/gid lines, the LINUX permission are getting applied when mounted this way.

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