QNAP QPKG for DVR Record Engine

Downloads & Instructions
Post Reply
psuKinger
Posts: 81
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

demonrik wrote:
Sat Jul 18, 2020 7:43 am
We're close.
Did you add the user hdhomerundvr to your other share once you reinstalled?
The user is removed and access to your share when you removed 1.0.2, so u need to add again. Then stop/start once more.
Tip: remove all log files in the recordpath folder while the engine is stopped and once it starts again you should see a new log file created to indicate is working. No log file, something is wrong.

fwiw.. removing share you open control panel->privilege->shared folders.
Select the folder and remove
Soooo...
I don't see "HDHomeRunDVR" listed as a "USER" the way you show it in the first post. I do, however, see it listed under "USER GROUPS"
So I gave the "local group" HDHomeRunDVR read/write access to my Recordings folder (where I actually store my recordings), and after doing so, saw no change to either my HDHomeRun app or my.hdhomerun.com. It still doesn't see my DVR.

So, I was unclear if the "permissions" needed to get applied on the "Recordings" share or the "HDHomeRunDVR" share, so I went ahead and did that. Once I do that, I can't open the Dashboard without login credentials, as I get a warning that "my connection is no longer private." That doesn't feel right to me, so I went ahead and undid that set of permissions? But "Denying" permissions means I get a "FORBIDDEN" message that I don't have permissions to open my Dashboard, and "read only" means the connection isn't private and I need login credentials to see the dashboard... so at this point I try to execute another "clean install".

- I remove the app from QTS
- I delete all the TXT files found in my "Recordings/HDHomeRunDVR" folder (looks like they were named after dates at which versions were released)?
- I remove the "HDHomeRunDVR" share folder from Control Panel --> Shared Folders
- I manually install qpkg 1.0.3 from my downloads folder
- I navigate to my Dashboard while the engine is stopped and update the recordings folder
- I restart the engine in QTS and confirm that my DVR File Storage location has updated. It has. I check the Recordings folder in Windows Explorer, and do not see any text files present. Sounds like that might be a problem?
- I go to Control Panel - Shared Folders and look at USERS and do not see HDHomeRunDVR. I do, however, see it under User Groups.
- I go my Shared Folder "HDHomeRunDVR" and I add the Local Group "HDHomeRunDVR" to the permissions list, and give it Read/Write. I hit "apply".
https://imgur.com/gRfpkeH
- I stop and restart the engine. The restart took a long time this time. A lot of "Processing".
- I can't "open" the dashboard. My session is no longer private. my.hdhomerun.com does not detect a DVR.

So I again removed the program from the App Center...

demonrik
Posts: 1283
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

psuKinger wrote:
Sat Jul 18, 2020 11:25 am
Soooo...
I don't see "HDHomeRunDVR" listed as a "USER" the way you show it in the first post. I do, however, see it listed under "USER GROUPS"
So I gave the "local group" HDHomeRunDVR read/write access to my Recordings folder (where I actually store my recordings), and after doing so, saw no change to either my HDHomeRun app or my.hdhomerun.com. It still doesn't see my DVR.
Group won't work.
You need to allow the user.. If for some reason its not showing there look via the User/Edit Shared Folder Permission screen
Control Panel-> Privilege -> Users and the second last icon on the right.
Image
That will list all shares and give you the option to set read only (RO), read/write (RW), or deny for each share.
Image
So, I was unclear if the "permissions" needed to get applied on the "Recordings" share or the "HDHomeRunDVR" share, so I went ahead and did that.
The 'Recordings' share because that is the one going to be used for your RecordPath
In fact once you update the RecordPath in the dashboard you should just remove the 'HDHomeRunDVR' share anyway as it's no longer needed.
Once I do that, I can't open the Dashboard without login credentials, as I get a warning that "my connection is no longer private."
Can you explain more?
Do you have the webDAV option enabled in your webserver? (Control Panel -> Applications -> Web Server -> WebDAV). Try disabling
That doesn't feel right to me, so I went ahead and undid that set of permissions? But "Denying" permissions means I get a "FORBIDDEN" message that I don't have permissions to open my Dashboard, and "read only" means the connection isn't private and I need login credentials to see the dashboard...
The permissions on the share have nothing to do with the dashboard. the share is only for storing the engine, logs and recordings.
The dashboard is in the 'Web' share
Deny means that the user cannot ever access any files in the share..
- I remove the app from QTS
- I delete all the TXT files found in my "Recordings/HDHomeRunDVR" folder (looks like they were named after dates at which versions were released)?
should have file extension .log? but am guessing you're accessing from windows mapped drive.
- I remove the "HDHomeRunDVR" share folder from Control Panel --> Shared Folders
- I manually install qpkg 1.0.3 from my downloads folder
- I navigate to my Dashboard while the engine is stopped and update the recordings folder
- I restart the engine in QTS and confirm that my DVR File Storage location has updated. It has. I check the Recordings folder in Windows Explorer, and do not see any text files present. Sounds like that might be a problem?
Yes - this is the main problem.. You shouldn't start the engine UNTIL you have the 'hdhomerundvr' user added to the 'Recordings' share.
If you don't do it right the engine won't start. The dashboard is independent and you will see in the status bar down at the bottom that the engine is not running.
- I go to Control Panel - Shared Folders and look at USERS and do not see HDHomeRunDVR. I do, however, see it under User Groups.
- I go my Shared Folder "HDHomeRunDVR" and I add the Local Group "HDHomeRunDVR" to the permissions list, and give it Read/Write. I hit "apply".
https://imgur.com/gRfpkeH
- I stop and restart the engine. The restart took a long time this time. A lot of "Processing".
As mentioned above this isn't right - you need to add the user to the 'Recordings' share.
- I can't "open" the dashboard. My session is no longer private. my.hdhomerun.com does not detect a DVR.
The open dashboard is a different problem.. sounds like you have the WebDAV enabled and so it's trying to open the HDHomeRunDVR share..
Either remove the share or disable WebDAV.. if you don't use WebDAV then it's always a good thing to disable anyway.

THe no DVR in my.hdhomerun.com is because the engine is not running yet.. you need to fix the permissions in the 'Recordings' share.

jumbleknot
Posts: 7
Joined: Sun Jul 12, 2020 9:45 am

Re: QNAP QPKG for DVR Record Engine

Post by jumbleknot »

scheb - thank you for finding the issue with WebDAV
demonrik wrote:
Fri Jul 17, 2020 12:56 pm
scheb wrote:
Fri Jul 17, 2020 12:44 pm
Confirmed fixed.
yay :D
Now just need to hear from @psuKinger, @jumbleknot and @ppilot to hopefully confirm all good on their ends.
I think we resolved @punch-card early on..
Only outstanding is @JWylds who has yet to respond to my Q, but I suspect is just the unchecking 'Do not allow Web Server embedding in iFrames' in the Web Server configuration.
demonrik - thank you for all of the help and apologies for the delayed response. It was a long week at work and my brain needed some time away from screens. Things seem to be mostly working for me now. First I will explain what I did, then I will explain what I mean by mostly working.

1. I uninstalled HDHomeRunDVR_1.0.1.qpkg, and manually removed any remaining files, shares, users, groups, etc.

2. I changed web server settings
Control Panel > Applications > Web Server
on Web Server tab: unchecked Do not allow Web Server embedding in IFrames
on WebDAV tab: unchecked Enable WebDAV
click Apply

3. I installed HDHomeRunDVR_1.0.3.qpkg and then validated the file share and the web directory were created

4. Opened HDHomeRunDVR from the App Center (and it worked!), and then changed the RecordPath to "/share/CACHEDEV2_DATA/MyDVR/HDHomeRunDVR", which is where I migrated all of my previous recordings to. I saved the change and closed out of HDHomeRunDVR.

5. From App Center I stopped and restarted HDHomeRunDVR

6. I verified that "hdhomerun_record" was now in the new RecordPath.

7. I deleted the HDHomeRunDVR share that was created during the install

8. I updated the Shared Folder Permissions for "hdhomerundvr" User and User Group to have read/write permissions to the MyDVR share.

9. I uninstalled HDHomeRunDVR from my old server and turned off the server to make sure only the new QNAP would get used.

After following these steps, I was able to view my old recordings, start new recordings, and view live TV.

The only issue I am having now is intermittent audio and video drop outs on live TV. I rebooted my QNAP, my HDHomeRun Prime, and my Nvidia Shield TV that I am running the HDHomeRun app on, but I still got the issue.

I will see how things go tomorrow and let you know if it settles itself. I hope that it isn't a problem with writing Live TV to my share which is on RAID 6.

psuKinger
Posts: 81
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

demonrik wrote:
Sat Jul 18, 2020 1:00 pm
Group won't work.
You need to allow the user.. If for some reason its not showing there look via the User/Edit Shared Folder Permission screen
Control Panel-> Privilege -> Users and the second last icon on the right.
Image
That will list all shares and give you the option to set read only (RO), read/write (RW), or deny for each share.
Image
This is what I see when I go to Contrl Panel --> Privilege --> Users:
https://i.imgur.com/Tp6et2a.jpg

When I click on the second to last icon on the right, for each of those users listed, the very first "admin" one (with "administrator" in the description), has Read/Write access to everything.
The second one, "Tim", has Read-only to the Multimedia and Public shares, and no permissions on any of the others.
Every other "admin" account below that shows no permissions.

I do see an HDHomeRunDVR "share" when I click on the "Edit Share Folder Permissions" button for any of the Users shown above:
https://i.imgur.com/8FY1WAW.png

I think I understand the task: I need to see a "User" named HDHomeRunDVR, in order to give that user R/W permissions to my Recordings folder... I just don't see that user. I see buttons to "create a user" and "import a user", but I don't see an "HDHomeRunDVR" user.

demonrik
Posts: 1283
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

psuKinger wrote:
Sun Jul 19, 2020 8:22 am
demonrik wrote:
Sat Jul 18, 2020 1:00 pm
Group won't work.
You need to allow the user.. If for some reason its not showing there look via the User/Edit Shared Folder Permission screen
Control Panel-> Privilege -> Users and the second last icon on the right.
Image
That will list all shares and give you the option to set read only (RO), read/write (RW), or deny for each share.
Image
This is what I see when I go to Contrl Panel --> Privilege --> Users:
https://i.imgur.com/Tp6et2a.jpg

When I click on the second to last icon on the right, for each of those users listed, the very first "admin" one (with "administrator" in the description), has Read/Write access to everything.
The second one, "Tim", has Read-only to the Multimedia and Public shares, and no permissions on any of the others.
Every other "admin" account below that shows no permissions.

I do see an HDHomeRunDVR "share" when I click on the "Edit Share Folder Permissions" button for any of the Users shown above:
https://i.imgur.com/8FY1WAW.png
What the ?!?!
Are you logged in as Tim or admin?
If admin, that's not right. Something very wrong going on.
If Tim.. u need to do all this as an administrator user, not as normal user.
I think I understand the task: I need to see a "User" named HDHomeRunDVR, in order to give that user R/W permissions to my Recordings folder... I just don't see that user. I see buttons to "create a user" and "import a user", but I don't see an "HDHomeRunDVR" user.
I create the user on installing the package. And remove once you uninstall.
To be clear the username is all lower case.. hdhomerundvr and not HDHomeRunDVR
So log in as an admin, and once package is installed add hdhomerundvr to your Recordings share and remove the HDHomeRunDVR share.

jumbleknot
Posts: 7
Joined: Sun Jul 12, 2020 9:45 am

Re: QNAP QPKG for DVR Record Engine

Post by jumbleknot »

jumbleknot wrote:
Sat Jul 18, 2020 8:19 pm
The only issue I am having now is intermittent audio and video drop outs on live TV. I rebooted my QNAP, my HDHomeRun Prime, and my Nvidia Shield TV that I am running the HDHomeRun app on, but I still got the issue.

I will see how things go tomorrow and let you know if it settles itself. I hope that it isn't a problem with writing Live TV to my share which is on RAID 6.
I am happy to report that everything is working great today. Not sure what was up with Live TV last night, but I am not having the issue today. I tested both Live TV and starting a recording and then watching it while it was still recording and no issues on either.

So all set here. Thanks again for all the help.

ppilot
Posts: 104
Joined: Mon Dec 17, 2007 7:33 pm

Re: QNAP QPKG for DVR Record Engine

Post by ppilot »

demonrik wrote:
Fri Jul 17, 2020 10:13 pm
ppilot wrote:
Fri Jul 17, 2020 8:35 pm
Do the above commands get copy and pasted into putty all at once? I tried that and then hitting Control D and the file still is not there.
At this point do clean install of 1.0.3 is best option. i.e. remove currently installed, then install new, and then update the recordpath
Yeah did this after posting this. Took no time at all and worked right away. Thanks for your help with this!!

psuKinger
Posts: 81
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

demonrik wrote:
Sun Jul 19, 2020 8:34 am
What the ?!?!
Are you logged in as Tim or admin?
If admin, that's not right. Something very wrong going on.
If Tim.. u need to do all this as an administrator user, not as normal user.
Per the image linked here, I *believe* I am logged in as "admin" (see the red circle I made in Microsoft Paint), and the list of users shown does not include user hdhomerundvr?
https://imgur.com/Z3uXURm

demonrik
Posts: 1283
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

psuKinger wrote:
Mon Jul 20, 2020 6:56 am
Per the image linked here, I *believe* I am logged in as "admin" (see the red circle I made in Microsoft Paint), and the list of users shown does not include user hdhomerundvr?
https://imgur.com/Z3uXURm
ok - that's worrying.
You should not see 7 admin users.
Something is very wrong here - you may want to open a ticket with Qnap

In the meantime - we can fall back to SSH to get this done

But first - am going to assume we've installed the QPKG, stopped the engine, modified the recordpath to /share/Recordings/HDHomeRunDVR and saved
you can also delete the HDHomeRunDVR share if you wish.

SSH to the NAS and log in as admin user
confirm admin is admin with the id command and check for uid=0

Code: Select all

 id
uid=0(admin) gid=0(administrators) groups=0(administrators),100(everyone)
If it's not 0 then we're back to the issue we see in the QTS UI and there is something very wrong with your NAS
If it is 0 - lets proceed

Just quick check to confirm the hdhomerundvr user is created by looking at the passwd file

Code: Select all

cat /etc//passwd

Should list all users (hopefully just 1 admin) including the hdhomerundvr user

to add the user to the share we use the acl_cmd tool to modify the access control list (acl) for the share

Code: Select all

acl_cmd -s Recordings -a hdhomerundvr -S W
Basically reads as for share (-s) Recordings add the user (-a) hdhomerundvr with security (-S) set for read/write (W)

Lets verify it worked with user_cmd

Code: Select all

user_cmd -s --user hdhomerundvr
Will list all shares and what the access privileges are for user hdhomerundvr
will look something like

Code: Select all

Apps:
Container:
ContainerData:RW
Download:
Games:
Multimedia:
Public:R
Web:
homes:
So for this user he has read/write access to ContainerData and read only access to Public and no access to any other shares.

Once verified - now start the engine up - either via QTS UI
or

Code: Select all

qpkg_service start HDHomeRunDVR
You should now see in your RecordPath a log file and hdhomerun_record file.

And chase up Qnap on that multiple admins in users dialog - that's just not right.

psuKinger
Posts: 81
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

demonrik wrote:
Mon Jul 20, 2020 8:19 am
Something is very wrong here - you may want to open a ticket with Qnap
Roger That.
demonrik wrote:
Mon Jul 20, 2020 8:19 am
But first - am going to assume we've installed the QPKG, stopped the engine, modified the recordpath to /share/Recordings/HDHomeRunDVR and saved
you can also delete the HDHomeRunDVR share if you wish.
Done, done, done, and done.
demonrik wrote:
Mon Jul 20, 2020 8:19 am
SSH to the NAS and log in as admin user
confirm admin is admin with the id command and check for uid=0

Code: Select all

 id
uid=0(admin) gid=0(administrators) groups=0(administrators),100(everyone)
If it's not 0 then we're back to the issue we see in the QTS UI and there is something very wrong with your NAS
If it is 0 - lets proceed
So mine looks a lot like yours, but not identical:

[~] # id
uid=0(admin) gid=0(administrators)
[~] #

I didn't get the part on the back end about "groups" and "100(everyone)".
demonrik wrote:
Mon Jul 20, 2020 8:19 am
Just quick check to confirm the hdhomerundvr user is created by looking at the passwd file

Code: Select all

cat /etc//passwd

Should list all users (hopefully just 1 admin) including the hdhomerundvr user
So I don't think this is what I wanted:

[~] # cat /etc//passwd
admin:x:0:0:administrator,psuKinger@hotmail.com,,:/share/homes/admin:/bin/sh
guest:x:65534:65534:guest:/tmp:/bin/sh
httpdusr:x:99:0:Apache httpd user:/tmp:/bin/sh
Tim:x:500:100:Linux User,,,:/share/homes/Tim:/bin/sh
admіn:x:0:0:administrator:/share/homes/admin:/bin/sh
аdmіn:x:0:0:administrator:/share/homes/admin:/bin/sh
admіn:x:0:0:administrator:/share/homes/admin:/bin/sh
аdmіn:x:0:0:administrator:/share/homes/admin:/bin/sh
admіn:x:0:0:administrator:/share/homes/admin:/bin/sh
аdmіn:x:0:0:administrator:/share/homes/admin:/bin/sh
[sshd]:x:110:65534:SSHD Privilege Separation:/var/empty:/bin/sh

So even though that might be a (deal-breaking?) problem, I went ahead and punched in these commands anyway and got:
demonrik wrote:
Mon Jul 20, 2020 8:19 am
to add the user to the share we use the acl_cmd tool to modify the access control list (acl) for the share

Code: Select all

acl_cmd -s Recordings -a hdhomerundvr -S W
Basically reads as for share (-s) Recordings add the user (-a) hdhomerundvr with security (-S) set for read/write (W)
I entered this and didn't get anything in return:
[~] # acl_cmd -s Recordings -a hdhomerundvr -S W
[~] #
demonrik wrote:
Mon Jul 20, 2020 8:19 am
Lets verify it worked with user_cmd

Code: Select all

user_cmd -s --user hdhomerundvr
Will list all shares and what the access privileges are for user hdhomerundvr
will look something like

Code: Select all

Apps:
Container:
ContainerData:RW
Download:
Games:
Multimedia:
Public:R
Web:
homes:
So for this user he has read/write access to ContainerData and read only access to Public and no access to any other shares.
Here's what I got (doesn't look like privileges are what we wanted):
[~] # user_cmd -s --user hdhomerundvr
Download:
HDHomeRunDVR:
Multimedia:
Music:
Public:
Recordings:
Tim:
Web:
[~] #

demonrik wrote:
Mon Jul 20, 2020 8:19 am
Once verified - now start the engine up - either via QTS UI
or

Code: Select all

qpkg_service start HDHomeRunDVR
You should now see in your RecordPath a log file and hdhomerun_record file.

And chase up Qnap on that multiple admins in users dialog - that's just not right.
No surprisingly based on the 2(ish) blips I hit above, I started up the Engine and it did not work.

I'll try to get in touch with QNAP and see if they can help me.

demonrik
Posts: 1283
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

psuKinger wrote:
Wed Jul 22, 2020 7:27 am
demonrik wrote:
Mon Jul 20, 2020 8:19 am
Just quick check to confirm the hdhomerundvr user is created by looking at the passwd file

Code: Select all

cat /etc//passwd

Should list all users (hopefully just 1 admin) including the hdhomerundvr user
So I don't think this is what I wanted:

[~] # cat /etc//passwd
admin:x:0:0:administrator,psuKinger@hotmail.com,,:/share/homes/admin:/bin/sh
guest:x:65534:65534:guest:/tmp:/bin/sh
httpdusr:x:99:0:Apache httpd user:/tmp:/bin/sh
Tim:x:500:100:Linux User,,,:/share/homes/Tim:/bin/sh
admіn:x:0:0:administrator:/share/homes/admin:/bin/sh
аdmіn:x:0:0:administrator:/share/homes/admin:/bin/sh
admіn:x:0:0:administrator:/share/homes/admin:/bin/sh
аdmіn:x:0:0:administrator:/share/homes/admin:/bin/sh
admіn:x:0:0:administrator:/share/homes/admin:/bin/sh
аdmіn:x:0:0:administrator:/share/homes/admin:/bin/sh
[sshd]:x:110:65534:SSHD Privilege Separation:/var/empty:/bin/sh

So even though that might be a (deal-breaking?) problem, I went ahead and punched in these commands anyway and got:
Yeah - something is very wrong on your setup.
You likely need to get Qnap to help resolve..
I suspect you may need to reset the NAS (keep your data, but reset to defaults)

psuKinger
Posts: 81
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

So I got support from QNAP, and I think I'm in a much better spot than I was. I no longer have all those extra "admin" accounts, there's only one "administrator," and I'm running the latest and greatest firmware firmware. The only problem is, I still don't see an "hdhomerundvr" user. Now I only see "admin" and "Tim", which I think is a lot better than where I was. But still not where I want to be.

So I'm back up and running, firmware updated, and I uninstalled the application and manually installed 1.0.3.
I stopped the record engine, updated the record path, restarted the engine, was able to confirm that the record path updated, AND (unlike last time) see a new text file created in my Recordings/HDHomeRunDVR folder. Good news.

But when I went to update user permissions, like I said, I don't see a user "hdhomerundvr". So I tried to work your step-by-step scrip within PuTTY.
[~] # id
uid=0(admin) gid=0(administrators)
[~] # cat /etc//passwd
admin:x:0:0:administrator,psuKinger@hotmail.com,,:/share/homes/admin:/bin/sh
guest:x:65534:65534:guest:/tmp:/bin/sh
httpdusr:x:99:0:Apache httpd user:/tmp:/bin/sh
Tim:x:500:100:Linux User,,,:/share/homes/Tim:/bin/sh
[sshd]:x:110:65534:SSHD Privilege Separation:/var/empty:/bin/sh
[~] #
[~] # acl_cmd -s Recordings -a hdhomerundvr -S W
[~] # user_cmd -s --user hdhomerundvr
Download:
HDHomeRunDVR:
Multimedia:
Music:
Public:
Recordings:
Tim:
Web:
[~] #

[~] # qpkg_service start HDHomeRunDVR
HDHomeRunDVR is disabled.
[~] #

Just for the sake of brevity I tried to just show above me copying in the text that your post asked me to put in, with what PuTTY outputted after I was done. And that's what I got...

Post Reply