NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 17 18 19 20 21 … 34 Next »
Recording to remote samba share

 
  • 0 Vote(s) - 0 Average
Recording to remote samba share
dlfergrd
Offline

Junior Member

Canada
Posts: 23
Threads: 4
Joined: Dec 2020
#1
2021-08-31, 09:52 PM
Hello:
First of all I apologize for the long post but want to give as much information as possible.
I was running NextPVR on a windows10 laptop for quite a while and did not have any problem recording to the samba share.

I am quite new to the linux world, just starting to change my user pc's to linux

But now I am really having trouble setting file permissions to allow recording to my linux samba share. I know its a permission error from the log entries

Code:
2021-08-31 12:23:57.907    [ERROR][13]    Unexpected error writing to OutputSink: System.UnauthorizedAccessException: Access to the path '/home/test/remote-record/Manual Recordings/myshow_20210831_12001300-0-0-0-0.ts' is denied.

The files do get created but nextpvr is unable to write to them.

I have researched for quite a few days now and have not found a solution for this. I am a rather new linux user and just starting to switch everything over from windows.

I am using ubuntu 20,04 server for my network shares using samba, and debian 11 on the laptop I  am using to run NextPVR.

The relevent samba.conf entries on the server are
Code:
[global]
    server role = standalone server
    unix password sync = yes
    os level = 20
    panic action = /usr/share/samba/panic-action %d
    preferred master = yes
    usershare allow guests = yes
    public = yes
    log file = /var/log/samba/log.%m
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    encrypt passwords = yes
    default = global
    obey pam restrictions = no
    server string = %h server (Samba, Ubuntu)
    logging = file
        disable netbios = yes
    pam password change = yes
    passwd program = /usr/bin/passwd %u
    null passwords = yes
    max log size = 1000
    map to guest = bad user

[NextPVR]
    guest ok = yes
    guest only = no
    guest account = sambaguest
    directory mode = 2775
    create mode = 0775
    force directory mode = 2775
    force create mode = 0775
    delete readonly = yes
    path = /mnt/storage1/NextPVR
    valid users = user1,user2,sambaguest,@sambashare
    write list = user1,user2,sambaguest,@sambashare
    writeable = yes
    comment = NextPVR Recording Directory

On the laptop pc I installed NextPVR as user test.
I have created a directory in the /home/test folder - remote-record and applied the shell script nextpvr-recording.sh to it.
I mount the samba share to that folder.

My /etc/fstab entry on the NextPVR laptop

Code:
//10.53.44.200/NextPVR /home/test/remote-record cifs username=sambaguest,password=password,uid=nextpvr,gid=video,noperm 0 0

The permissions I see on the samba server do not seem to be created as 775, they show 754. I have read about ACL in the samba server but I have not been able to implement them.

I am sure someone here is recording to a  linux samba share from a linux pc and could possibly point me in the right direction.
Thank you.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,108
Threads: 957
Joined: May 2006
#2
2021-09-01, 12:21 AM (This post was last modified: 2021-09-01, 12:23 AM by mvallevand.)
I use a cifs and nfs share with no problem but I don't feel the need trying to place permissions on video folders at home so I won't attempt to help there.

To get NextPVR working what permissions do you see with

ls -lt /home
and
ls -lt /home/test

home is an odd mount point for file shares.

Martin
dlfergrd
Offline

Junior Member

Canada
Posts: 23
Threads: 4
Joined: Dec 2020
#3
2021-09-01, 02:06 AM
Here is the output

test@ASUS-Laptop:~$ ls -lt /home
total 4
drwxr-xr-x 19 test test 4096 Aug 30 16:52 test
test@ASUS-Laptop:~$ ls -lt /home/test
total 44
drwxrwxr-x  2 nextpvr video    0 Aug 31 17:00 remote-record
drwxrwsr-x+ 3 test    video 4096 Aug 30 17:00 recordings
drwxr-xr-x  4 test    test  4096 Aug 30 12:18 Documents
-rw-r--r--  1 test    test  5832 Aug 29 19:15 nextpvr-helper.deb
drwxr-xr-x  2 test    test  4096 Aug 29 12:05 Downloads
drwxr-xr-x  2 test    test  4096 Aug 29 11:43 Desktop
drwxr-xr-x  2 test    test  4096 Aug 29 11:43 Music
drwxr-xr-x  2 test    test  4096 Aug 29 11:43 Pictures
drwxr-xr-x  2 test    test  4096 Aug 29 11:43 Public
drwxr-xr-x  2 test    test  4096 Aug 29 11:43 Templates
drwxr-xr-x  2 test    test  4096 Aug 29 11:43 Videos


This is with the share mounted to remote-record. The file flags would be the same as the recordings folder without the share being mounted

I have made a bit of progress..... I think.
Created a new share

[remote-record]
directory mode = 2777
create mode = 777
guest ok = yes
comment = NextPVR recording directory
path = /mnt/storage1/remote-record
force create mode = 777
valid users = @sambashare
writeable = yes
write list = @sambashare
force directory mode = 2777


and a new /etc/fstab entry on the laptop

//10.53.44.200/remote-record /home/test/remote-record cifs cifsacl,username=sambaguest,password=password,uid=nextpvr,gid=video,noperm 0 0

I added the 'cifsacl' option.

The stream is now being saved to the share but ......

2021-08-31 18:35:02.811 [DEBUG][9] Running: bash /var/opt/nextpvr/scripts/change_channel.sh 166
2021-08-31 18:35:02.814 [DEBUG][9] Child PID: 1047
2021-08-31 18:35:02.823 [DEBUG][9] Creating writer: /home/test/remote-record/Manual Recordings/My Show_20210831_18301900-0.ts
2021-08-31 18:35:02.893 [ERROR][9] Unexpected error creating TSWriter map: System.UnauthorizedAccessException: Access to the path '/home/test/remote-record/Manual Recordings/My Show_20210831_18301900-0.ts.map' is denied.
---> System.IO.IOException: Permission denied
  --- End of inner exception stack trace ---
  at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
  at System.IO.FileStream.WriteSpan(ReadOnlySpan`1 source)
  at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
  at System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes)
  at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
  at NShared.Writer.OutputSink..ctor(String filename)
2021-08-31 18:35:02.914 [INFO][1] Enabling web server response compression
2021-08-31 18:35:02.915 [DEBUG][1] Using webroot: /opt/nextpvr/system/wwwroot/
2021-08-31 18:35:02.916 [DEBUG][9] StartStream [/home/test/remote-record/Manual Recordings/Joni Table Talk_20210831_18301900-0.ts] allocated handle: 1
2021-08-31 18:35:02.916 [DEBUG][9] Started recording (1557:1:/home/test/remote-record/Manual Recordings/Joni Table Talk_20210831_18301900-0.ts)
2021-08-31 18:35:02.925 [DEBUG][9] No /var/opt/nextpvr/scripts/ParallelProcessing.sh
2021-08-31 18:35:30.345 [DEBUG][15] Logged in session from PLC: 32fb3dfe-a55e-4b72-805b-c7a852bf3045


No access to the ts.map file
No errors about the stream recording
After the recording finishes the ts.map is gone and there is a .xml file for the show
Everything has 0 bytes.

Thanks for the help!
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,108
Threads: 957
Joined: May 2006
#4
2021-09-01, 02:41 AM
Is there a nextpvr usr in the server to use with that uid?

Martin
dlfergrd
Offline

Junior Member

Canada
Posts: 23
Threads: 4
Joined: Dec 2020
#5
2021-09-01, 03:15 AM (This post was last modified: 2021-09-01, 03:19 AM by dlfergrd.)
No there is not. I thought the uid= was for the client to mount the share as.

On the client ls -l shows the owner:group as nextpvr:video
If i use 'test' as the uid the ls -l shows owner:group as test:video

I did not think the server needed a user nextpvr.

Anyway I am trying to set up nfs sharing to see if I can get that to work.

Sorry to waste your time and thanks for the help.
I will post back with what i find
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,108
Threads: 957
Joined: May 2006
#6
2021-09-01, 03:17 AM
That's where I would think they are not talking the same permissions. I am not spending time on it as I say the security isn't worth it to me (/etc/fstab is in the clear) but if you are having fun that's what counts.

Martin
dlfergrd
Offline

Junior Member

Canada
Posts: 23
Threads: 4
Joined: Dec 2020
#7
2021-09-01, 03:20 AM
Wow you're fast and yes 2 weeks of FUN!
dlfergrd
Offline

Junior Member

Canada
Posts: 23
Threads: 4
Joined: Dec 2020
#8
2021-09-03, 04:17 PM (This post was last modified: 2021-09-03, 04:18 PM by dlfergrd.)
A Quick update.
I did get NFS file sharing to work.
I am still working on the Samba stuff.

Now to get the intel hardware acceleration to work......
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,108
Threads: 957
Joined: May 2006
#9
2021-09-03, 04:28 PM
Is your NFS share restricted to the nextpvr user? That is the tricky part.

Martin
dlfergrd
Offline

Junior Member

Canada
Posts: 23
Threads: 4
Joined: Dec 2020
#10
2021-09-03, 05:03 PM
No its not.. I have been reading about that still. Working on it. As well as the samba stuff including using a credentials file.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording Plyback Timeline Issue JeffH 11 856 2025-01-17, 03:20 PM
Last Post: mvallevand
  Strange problem writing to CIFS share ehfortin 5 708 2024-12-27, 08:00 PM
Last Post: ehfortin
  Wake on suspend for recording flyingsubs 15 4,780 2024-12-03, 01:07 PM
Last Post: mvallevand
  NextPVR i.mjh.nz [Failed: Recording interrupted] Nzbaxterman 6 894 2024-10-29, 11:44 PM
Last Post: sub
Wink recording rules - nextpvr kfmf 4 851 2024-07-20, 08:50 AM
Last Post: kfmf
  Live stream not working while recording pciber 6 1,086 2024-06-10, 07:48 AM
Last Post: pciber
  Remote NextPVR backup script for Linux snagglewest 2 697 2024-02-06, 05:44 PM
Last Post: snagglewest
  Time scheduled radio recording? WagMan 8 1,270 2024-01-13, 05:34 PM
Last Post: mvallevand
  Recording length error VCR58 20 2,418 2023-11-12, 11:46 PM
Last Post: mvallevand
  Nextpvr Has Stopped Recording Mark_S 4 935 2023-05-28, 04:27 PM
Last Post: Mark_S

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

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

Linear Mode
Threaded Mode