NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
« Previous 1 2 3 4 5 6 … 9 Next »
NextPVR in Unraid Docker is writing recordings with 755 permissions

 
  • 0 Vote(s) - 0 Average
NextPVR in Unraid Docker is writing recordings with 755 permissions
antenna
Offline

Member

Posts: 61
Threads: 8
Joined: Oct 2017
#1
2022-06-04, 11:12 PM
I'm trying to transition my NextPVR setup from my power-hungry Windows box to a docker instance in Unraid, and I'm learning as I go. I apologize in advance, because I'm a little outside of my depth here. 

Setup went fine, thanks to those who have provided guidance in these forums. It can access the HDHomeRun on the network, has gathered guide data, and records to the correct directory. Honestly, it's working quite nicely. Except one problem.

The recording directory is shared to a non-root user account, which has r/w permissions to the share in Unraid. Let's call the account "bandit". When I access that share via Windows as bandit, I can view the file list and watch the recordings. But when I try to delete or edit a recording, a pop-up tells me, "You require permission from SERVER/root to make changes to this file". I can delete the same files from within the NextPVR WebUI.

I think I've found the cause of this problem. Inside the shared directory, I've created folders for sorting recordings (TV, Movies, Sports). Those are all 777 permissions, as seen here:

Code:
drwxrwxrwx 1 nobody users  60 May 30 19:17 ./
drwxrwxrwx 1 nobody users 134 Jun  4 10:55 ../
drwxrwxrwx 1 nobody users  10 May 30 19:17 Movies/
drwxrwxrwx 1 nobody users  10 Jun  4 12:59 Sports/
drwxrwxrwx 1 nobody users  10 Jun  4 15:26 TV/

But whenever NextPVR creates a directory and/or records a show to a TS file, it writes those with 755 permissions. Here's an example inside the TV folder:

Code:
drwxrwxrwx 1 nobody users  10 Jun  4 15:26 ./
drwxrwxrwx 1 nobody users  60 May 30 19:17 ../
drwxr-xr-x 1 root  root  139 Jun  4 14:31 WKRP\ in\ Cincinnati/

And the same for the files inside:

Code:
drwxr-xr-x 1 root  root        139 Jun  4 14:31 ./
drwxrwxrwx 1 nobody users        10 Jun  4 15:26 ../
-rw-r--r-- 1 root  root  394689424 Jun  4 14:31 WKRP\ in\ Cincinnati.S01E15.Never\ Leave\ Me,\ Lucille.ts
-rw-r--r-- 1 root  root        788 Jun  4 14:31 WKRP\ in\ Cincinnati.S01E15.Never\ Leave\ Me,\ Lucille.xml

I'm not sure this is the source of the problem, but seems like it. I'd like to be able to access those files/directories as r/w using bandit, as well as any future account I give r/w share access to, including possibly just making the whole directory public r/w. If possible, I'd prefer to not manually chmod it after the recording completes.

In Windows on NTFS this was never a problem. Honestly, I don't know if this is related to NextPVR, docker, or Unraid, so I started here. Is this typical behavior? And is there a way to always have directories and files written as 777 when NextPVR records?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,770
Threads: 954
Joined: May 2006
#2
2022-06-04, 11:54 PM
Since the default is to start the Docker as root files will be created as root. I start mine as nobody with the --user 65534:100 so anyone on on my LAN as free access.

Martin
antenna
Offline

Member

Posts: 61
Threads: 8
Joined: Oct 2017
#3
2022-06-05, 01:51 AM
Thanks, that gave me some direction, after which a search led to a number of similar complaints about file permissions when docker starts as root.

I'm off to figure out how to start an unraid docker as a different user from inside the web interface.
vintdiesel
Offline

Member

Posts: 114
Threads: 23
Joined: Jan 2012
#4
2022-06-07, 10:34 PM (This post was last modified: 2022-06-07, 10:36 PM by vintdiesel.)
I came across this problem too. The way I got around it was to add a line in my ParallelProcessing script to change the folder permission to 777 as below:

#!/bin/bash
# --------------------------
# ParallelProcessing.sh
# D.Little
# Verson 100 - 1st Linux shell translation
# dated 09/08/2019
# --------------------------

echo _____________________________________________________________________________________________________________________ >>/config/logs/processing.log
echo $(date "+%d/%m/%Y %T") - $3 - Recording started on $1 recorded channel $2 on tuner $4 >>/config/logs/processing.log

#Make work directory writable from any PC so files can be copied, written to etc.
workdir=$(dirname "$1")
chmod 777 "$workdir"

# End of script
exit 0
Win Server: ASRock P67 Pro3 B3, i5 2500K 4.0Ghz, 16GB, Nvidia GT430 HDMI, Win 10 Pro 64bit, Win-TV Quad HD, Win-TV Nova-T USB.
UnRaid NAS Server: Gigabyte i7 2600 3.4Ghz, 16GB, S3 Trio VGA PCI Video, DVB LibreElec for DVB-T tuner drivers, Hauppage Win-TV 2210 Dual DVB-T.
Win Client: Intel NUC i3 Broadwell, 4GB Ram, 128GB SSD, Win 10 Pro 64bit.
Linux Client: Raspberry Pi 3+, OSMC + Kodi
greg in kansas
Offline

Member

Posts: 170
Threads: 27
Joined: Feb 2007
#5
2022-09-24, 12:20 AM
Did you find out how to do this with Unraid
"I'm off to figure out how to start an unraid docker as a different user from inside the web interface. "
Or did you go the post way?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPvr Instance Unresponsive itsnotjeff 6 278 2025-04-15, 04:57 PM
Last Post: mvallevand
  Error detecting HDHR devices with marklambert/nextpvr-ccextractor SickBoy 16 759 2025-03-23, 08:52 PM
Last Post: sub
  Comskip segfaults with comskip embedded in amd64 docker SickBoy 6 321 2025-02-24, 11:18 PM
Last Post: SickBoy
  Issues with Session Handling Behind Caddy Reverse Proxy in Docker: invalid session user001 5 363 2025-01-10, 08:23 PM
Last Post: sub
  Docker container becomes unresponsive overnight wapkaplet 6 558 2025-01-10, 04:47 PM
Last Post: wapkaplet
  Docker image upgrade ceejayemm 9 799 2025-01-07, 11:27 PM
Last Post: pkscout
  Current guide for NextPVR docker on Unraid? wapkaplet 1 664 2024-12-20, 02:40 AM
Last Post: wapkaplet
  Modification to the NextPVR Image DockerFile thelanofvilles 5 491 2024-12-15, 07:30 PM
Last Post: thelanofvilles
  NextPVR with Docker and Fritzbox icompas 9 566 2024-12-12, 02:50 PM
Last Post: icompas
  Docker postprocessing script aTF6i 12 947 2024-11-17, 01:17 AM
Last Post: aTF6i

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode