cant use NFS Shares for Live TV and Recording Directories

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Sun Jul 29, 2018 11:08 pm

Hi,

Im having a issue when watching Live TV its saving the stream onto the SSD & Recordings are also going onto the SSD ive tried changing locations to a Server that uses NFS but it keeps saying a issue about Permissions. I can Read and Write to it. Any ideas? This is what i have in my fstab.

Code: Select all

192.168.1.9:/mnt/md0/Storage /home/jackbamford/Velvet nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 00
Thanks.

User avatar
bill6502
Developer
Posts: 1052
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by bill6502 » Mon Jul 30, 2018 2:31 am

Try: sudo --set-home --login --user=mythtv (overkill, but I've got an alias
that does it) and try writing somewhere on NFS mount. That's the user the backend runs
as (for most folks.) Control-d to get back to your own user.

Google turns up things like this:
https://unix.stackexchange.com/question ... ory#252815

jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

Re: cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Mon Jul 30, 2018 4:08 pm

Hi,

Thanks for your reply. but sudo --set-home --login --user=mythtv doesnt seem to do anything? All i get in Terminal is this?

Code: Select all

jackbamford@HTPC-Server:~$ sudo --set-home --login --user=mythtv
[sudo] password for jackbamford: 
$ 

User avatar
bill6502
Developer
Posts: 1052
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by bill6502 » Mon Jul 30, 2018 5:27 pm

Type: id when you get the new prompt. It should tell you that
you're now user mythtv. Then try to create and delete a file.

jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

Re: cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Mon Jul 30, 2018 6:34 pm

The problem im having is changing Live TV and Recording Directories to NFS Shares. When i watch live TV kodi seems to record everything im watching to the SSD.

User avatar
bill6502
Developer
Posts: 1052
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by bill6502 » Mon Jul 30, 2018 7:52 pm

I think I understood that. But I read that your read/write test was done by user
jackbamford. mythtv is the user that reads/writes to the Storage Directories
defined in the Storage Groups. Most just use the Default Storage Group. I assume
you made the change there and removed the path to the SSD and added the
/home/jackbamford/Velvet Storage Directory. Testing that user mythtv can read/
write there is where I'd start.

Just to be sure, after the SG change, I'd restart the backend.

Note that some folks have a LiveTV SG and that would have to be changed too.

Looking in your backend logs may help you determine the issue.

jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

Re: cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Mon Jul 30, 2018 8:18 pm

Oh i understand now sorry. So heres what ive tried. I tried created a folder on Velvets storage drive via terminal using MythTV account without using Sudo however doesnt work. Ive also tried created the folder with Sudo MythTV but the problem is that it asks for the password for MythTV account but i dont know the password. Ive tried the password from config.xml but doesnt work.

User avatar
bill6502
Developer
Posts: 1052
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by bill6502 » Mon Jul 30, 2018 8:40 pm

I'd re-look at the link in my 1st response or ones like it.

I do have my MythTV music NFS-mounted from my NAS and it doesn't
have a mythtv user. In that case, I changed the mode of the directory
on the NAS to 777 (world read/write/search access.)

Code: Select all

automount (not fstab): /var/lib/mythtv/music -fstype=nfs,noatime nas1:/nfs/Public/"Shared Music"
$ ls -ld /nfs/Public/Shared\ Music/
drwxrwxrwx   68 root     root          4096 Jul 28 09:43 /nfs/Public/Shared Music/

wesnewell
Senior
Posts: 356
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by wesnewell » Mon Jul 30, 2018 9:57 pm

User mythtv doesn't need to own the storage groups. It just needs read/write permissions to it. I use the standard var/lib/mythtv/livetv, but most other things I use a separate drive I own and just give mythtv read/write permissions it. I think I have both the default dirs as a SG too, but mythtv will choose the one with the most available space, which in my case will always be the separate drive.
wes@mythfe0:~$ ls /sdb/
2018-07-25-16-img lost+found pictures videos
default music recordings wes
Backend-GF8200A, AMD Phenom II B95, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

Re: cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Mon Jul 30, 2018 10:10 pm

Ok so does the folder need to have 777? Or does the whole share need to be set to 777? The permissions are set to jackbamford but i created the folder and added it to the mythtv group but that doesnt work. Thanks. Sorry for all the questions.

wesnewell
Senior
Posts: 356
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by wesnewell » Mon Jul 30, 2018 10:38 pm

jbamford wrote:
Mon Jul 30, 2018 10:10 pm
Ok so does the folder need to have 777? Or does the whole share need to be set to 777? The permissions are set to jackbamford but i created the folder and added it to the mythtv group but that doesnt work. Thanks. Sorry for all the questions.
iirc 777 is world access for read/write. That will certainly work, but you may not want to open up everything like that. I do for most mythtv recordings since they really aren't that important to me, but I also don't give world write to my pictures dir and other things on the drive.
wes@mythfe0:~$ ll /sdb/
total 60
drwxrwxrwx 10 wes wes 4096 Jul 25 11:52 ./
drwxr-xr-x 26 root root 4096 Jul 24 23:45 ../
drwxr-xr-x 2 root root 4096 Jul 25 11:55 2018-07-25-16-img/
drwxrwxrwx 2 wes wes 4096 Jul 29 19:18 default/
drwx------ 2 root root 16384 May 27 2017 lost+found/
drwxrwxrwx 2 wes wes 4096 Jul 29 19:18 music/
drwxrwxr-x 22 wes wes 4096 Jul 30 08:51 pictures/
drwxrwxrwx 2 wes wes 12288 Jul 30 17:00 recordings/
drwxrwxrwx 2 dnsmasq bluetooth 4096 Jul 29 19:18 videos/
drwxrwxr-x 5 wes wes 4096 Jul 24 18:08 wes/
Backend-GF8200A, AMD Phenom II B95, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

Re: cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Tue Jul 31, 2018 12:04 am

Thanks for your reply. So if i create a folder on my server as Mythtv and folders inside mythtv folder called live tv and recordings can the live tv folder and recordings folder be 777 or does the mythtv folder have to be also and everything else on the RAID?

wesnewell
Senior
Posts: 356
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: cant use NFS Shares for Live TV and Recording Directories

Post by wesnewell » Tue Jul 31, 2018 4:59 am

If you create a folder with mythtv as the owner, then mythtv can r/w to it by default, but others can't unless you give either a group r/w rights to it, or give others r/w rights to it. You need to understand what drwxrwxrwx means. The d means directory, The next rwx means read write and execute for the owner. The next rwx means read write and execute for the group.The next rwx means read write and execute for others (iow, anyone). How you want to set it up is up to you. If you give others rw access then anyone, including mythv user can read and write to it. If mythtv is the owner, then it will automatically have read write permissions to it that folder. If mythtv is the owner of all folders under that, ditto. Suggest you look at man chown, and man chmod for in depth descriptions even if you use a file manager to change owner or permissions.
Backend-GF8200A, AMD Phenom II B95, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

jbamford
Junior
Posts: 20
Joined: Wed Jul 25, 2018 12:12 am
Great Britain

Re: cant use NFS Shares for Live TV and Recording Directories

Post by jbamford » Tue Jul 31, 2018 5:46 am

Hi,

Ive managed to sort it.

Code: Select all

 4 drwxrwxrwx 2 jackbamford jackbamford      4096 Jul 31 06:43 livetv
     4 drwxrwxrwx 2 jackbamford jackbamford      4096 Jul 31 06:27 recordings
jackbamford@Velvet:/mnt/md0/Storage/mythtv$ 
Thanks guys :)

Post Reply