[Solved] Slave Backend - Write Permissions

For discussion of topics specific to MythTV on linux
Post Reply
AndyInNYC
Junior
Posts: 27
Joined: Mon Mar 21, 2016 3:37 pm
United States of America

[Solved] Slave Backend - Write Permissions

Post by AndyInNYC »

I'm trying to set up a slave backend. My master with 2 tuner cards is working correctly. Both slave and master are running fully up to date Ubuntu 16.04 and MythTV .28.

The master writes to the Default group which is set to /media/RAID/Media/TVShows.
This directory has the following permissions

Code: Select all

drwxr-xr-x 2 server tvgroup 4096 May 16 22:00 TVShows
files in the directory (I've been playing around) look like this:

Code: Select all

server@Server:~$ ls -l /media/RAID/Media/TVShows
total 16764
-rw-r--r-- 1 server tvgroup 3185927 Apr 25 07:42 mythconverg-1344-20170425074202.sql.gz
-rw-r--r-- 1 server tvgroup 4322731 May  2 07:43 mythconverg-1344-20170502074256.sql.gz
-rw-r--r-- 1 server tvgroup 4716654 May  9 07:42 mythconverg-1344-20170509074207.sql.gz
-rw-r--r-- 1 root   root    4932816 May 16 07:42 mythconverg-1344-20170516074242.sql.gz
tvgroup has the following members:

Code: Select all

server@Server:~$ grep tvgroup /etc/group
tvgroup:x:1001:root,server,mythtv,slave_myth
slave_myth was created so the slave could connect
The Master machine has a SAMBA share set up that looks like this:

Code: Select all

[TVRecordings]
        path = /media/RAID/Media/TVShows
        valid users = root server mythtv slave_myth
        write list = server root slave_myth mythtv
        force user = server
        read only = No
        create mask = 0755
        force directory mode = 0777
        guest ok = Yes
On the slave machine, I have a file in /etc/samba called user which contains:

Code: Select all

username=server
password=ThePass
and a line in fstab which reads:

Code: Select all

//192.168.40.28/TVRecordings /media/TVRoot cifs credentials=/etc/samba/user,noexec 0 0
I have used slave_myth and it's password in the user file as well. the user 'server' occurs on both machines with the same password, btw.

From the command line on the slave machine I can create, copy and edit files in the TVRoot directory (the Default location for the master).

Now (finally) the problem.

If I run mythtv-setup on the slave and attempt to create a default group for storage of /media/TVRoot the program reports back that the directory is not writable.

Somewhere I read that I shouldn't set up a default for the slave, but I'm obviously a little lost here. What change(s) should I make to get this all working?

Thanks everyone,


Andrew
Last edited by AndyInNYC on Tue May 23, 2017 8:17 pm, edited 1 time in total.
AndyInNYC
Junior
Posts: 27
Joined: Mon Mar 21, 2016 3:37 pm
United States of America

Re: Slave Backend - Write Permissions

Post by AndyInNYC »

No thoughts on where I'm going wrong?
daraden
Senior
Posts: 175
Joined: Tue Feb 23, 2016 7:33 am
United States of America

Re: Slave Backend - Write Permissions

Post by daraden »

I'm no expert but, from whats on the the wiki. You should be assigning the directory(/media/TVRoot/) to the storage group on the master-backend and not the slave. Master-backend will check the directory and since it cant find it is ignored. Slave-backend checks the storage groups listed on the master-backend and finds that the directory exists so it uses it.
example:
Master-backend Default storage group contains /media/RAID/Media/TVShows/ and /media/TVRoot/
Slave-backend no directory's are defined

Maseter-backend storage group check:
/media/RAID/Media/TVShows/ - exists write here
/media/TVRoot/ - not found ignore

Slave-backend storage group check: <--using storage groups defined only on Master-backend
/media/RAID/Media/TVShows/ - not found ignore
/media/TVRoot/ - exists write here

Since you are using a central storage point on the master-backend i think the simplest solution would be to just use a single mount point for both. Unless you already have another /media/RAID/Media/ on the slave.

First delete any storage groups defined on the slave-backend.

You then may want to change your SAMBA conf so that you are using a folder inside the mount point. This avoids writing to nowhere if the SAMBA share is not mounted.

lets assume /media/RAID/Media/TVShows/ is your storage group directory. You would want the path for SAMBA to be /media/RAID/Media/

Then for the mount point in fstab on the slave-backend would also be /media/RAID/Media/

So now on both systems when the backend looks at the storage group directory's with only /media/RAID/Media/TVShows/ both backends can see it and use it. This also has the benefit of not having to remember some arbitrary mount point mapping later.
AndyInNYC
Junior
Posts: 27
Joined: Mon Mar 21, 2016 3:37 pm
United States of America

Re: Slave Backend - Write Permissions

Post by AndyInNYC »

daraden,

Thanks for the reply. I'll give it a shot.


Andrew
AndyInNYC
Junior
Posts: 27
Joined: Mon Mar 21, 2016 3:37 pm
United States of America

Re: Slave Backend - Write Permissions

Post by AndyInNYC »

OK, I deleted the Default Storage Group on the Slave machine. This was far harder than it should have been, and I'm including these comments in case someone stumbles across this thread in need of help.

The directions for deleting a storage group entry typically state to hit the 'delete' key. My keyboard has two and neither did anything. Pressing the 'D' or 'd' key allowed me to delete the entries.

I now have 3 tuners recording junk daytime TV - but recording nonetheless.

Thanks.

Now, on to the (hopefully) last problems in a new thread.


Andrew
Post Reply