TVHeadend Network Recording Not Working

Hi,
I have a Raspberry Pi 2 with OSMC 2018.12-1 running on it. I have recently purchased the OSMC TV dongle for setting up watching and recording of TV programs with the official OSMC TVHeadend App from the OSMC store. I have gotten everything installed and can watch live TV with no issues :slight_smile:. The version of TVHeadend that I have got is 4.2.6.

I have a second Raspberry Pi 2 B running OpenMediaVault to provide me with a NAS setup. I have created a NFS shared folder (with Read/Write Permissions configured for Everyone) on the NAS and this is the location that I wish to record programs to using TVHeadend. I have mounted the Network drive onto my Raspberry Pi running OSMC following these instructions Configuring fstab based NFS share mounts.

I then configured TVHeadend using the WebGUI to point to this mounted Network drive. However, whenever I attempt to record a program it starts and then stops immediately and in the WebGUI it shows in the Removed Recordings tab under Digital Video Recorder. When I view the error information for that recording there it tells me File Not Created.

Debug logs can be found here.

I feel as though I am really close. Is anyone able to help me out? Thanks in advance.

As user osmc, run the following:

ls -l /mnt/Server_Media/Recordings/
mount
touch /mnt/Server_Media/Recordings/test.txt

The first is to check permissions, the second to check if the mount is read-only, and the third to verify that the Kodi user can create files there.

One thing to try if you can’t create the file is to add “rw” to the options on the line in fstab. It’s part of the “defaults”, but I can’t recall if those defaults still apply if you provide other options. If you can create the file in the shell, then it’s a Kodi issue, but it’s still permission related…does the PVR add-on have a config where you give a user/password?

Thanks for responding @nabsltd.

Regarding your comment

How do I do that exactly? As in how do I ensure that I am the user osmc when running the commands on command line?

Apologies, my question above was silly :roll_eyes:. I have run the above commands and the results are as follows:

So it does appear to be a permissions issue… and the rw option with mounting the NFS folder as a drive appears to be coming through successfully as a default.

Yes, when setting up the TVHeadend backend I configured the administrator user to have username and password of osmc. And I used that config when setting up the addon.

This looks ok, so it has to be corrected on the NAS site.
What NAS is it?

So, let’s take a look at the directory itself…try:

ls -l /mnt/Server_Media/

Don’t screenshot the results…just copy/paste output text from the shell to your post.

Sorry. OK, no problems.

osmc@OSMC : ~ $ ls -l /mnt/Server_Media/
total 8
drwxr-sr-x 2 501 users 4096 Jan 4 12:47 Recordings
drwxr-sr-x 4 501 users 4096 Jan 4 12:47 TMAC_Fitness

It is a Raspberry Pi 2 running Open Media Vault, with a WD 2TB external drive.

@JimKnopf you were right on the money. It was an issue on my NAS side. I went back in and double checked the permissions and whilst Everyone had permissions set to Read/Write/Execute there was another option to Recursively Apply Permissions to Files and Subfolders. I enabled this and it all appears to be working.

This shows the problem. The osmc user has UID 1000, but this directory only has write permission for user ID 501. To do things right, there should be an osmc user on the NAS with UID 1000. That way, everything matches up.

Then, change the owner of the “Recordings” directory to osmc. You’ll have to do this on the NAS.

Thanks @nabsltd,
I have performed the changes that you suggested on the NAS end and this is now the result of the command that you mentioned above:

osmc@OSMC : ~ $ ls -l /mnt/Server_Media/
total 8
drwxrwsrwx+ 2 osmc users 4096 Jan 6 08:54 Recordings
drwxrwsrwx+ 4 root users 4096 Jan 4 12:47 TMAC_Fitness