View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Nov 29, 2009 11:37 am 
Offline
Joined: Fri Nov 04, 2005 7:11 am
Posts: 61
Since I run several frontends, (and often boot more than one distro on them), sometimes the UID and GID numbers for my shared myth directories don't match up with the UID/GIDs on my backend. The orthodox way to fix this is to change each machine so that the UID/GIDs are all the same. Unfortunately, it can be difficult to actually make the changes without messing up the functioning of the other system. Chmodding the shared directories to 777 doesn't work right either, because if the remote user writes a file it often won't be owned by mythtv:mythtv on the backend. So here is the solution that I use:

1. Install bindfs from http://code.google.com/p/bindfs/. On my buntu/debian systems I use:
Code:
sudo apt-get install bindfs


2. Change /etc/exports on the backend as follows (if needed):
Code:
/myth   *(rw,async,anonuid=1000,anongid=1000)

The anonuid/anongid part is important, or any new files that get added on a frontend will be owned by nobody:nogroup.

3. I mount my myth shares at /myth on my frontends for consistency, you will have to adjust this section to match your mount points.
a. Make a new directory, on the frontend, for the myth share that is different from the mount point you have defined in mythtv setup.
Code:
mkdir /mnt/mythwrong


4. Edit /etc/fstab to mount the directories.
a. Change your nfs mount line to point to /mnt/mythwrong.
Code:
192.168.1.130:/myth /mnt/mythwrong nfs rsize=8192,wsize=8192,timeo=14,intr   0   0


b. Add the following line (or something like it) for bindfs after your nfs mount line
Code:
bindfs#/mnt/mythwrong /myth fuse owner=mythtv,group=mythtv,perms=0000:u+rwD:g+rwD:o+rD   0   0


Done. You can either reboot or as root:
Code:
umount /myth
mount -a


Now, when you go to your /myth directory, it will show user/group of mythtv on the files with rw permissions for the user and group and read permissions for others. If you make a new file in the directory it will get mythtv:mythtv for owner and group on the frontend and on the backend. :D

I originally discovered bindfs when I was trying to set up a shared folder between my wife and I, where it would look like the files were owned by me:users when I opened/made them and her:users when she opened/made them. Try "man bindfs" to get an idea of what this great little fuse program can do.

_________________
BE: R8.4, HVR2250, MCE media center remote, GigaByte GA-EP43-UD3L, 2gb ram

FE: Linhes 8.4, Mythbuntu, Linux Mint DE


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 12, 2009 2:58 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Cool post. I had the problem not too long ago. Thanks to all who replied in my thread, it's fixed now simply by changing uid/gid values for the mythtv in /etc/passwd and reseting key dirs on the file system.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu