What is the default user:group that channels runs as in Freenas?

I’m fine leaving it alone and just running everything as root as long as it works, I’m new to freebsd and have just set all other jails up with their own user which is why I was attempting it that way

Okay, instead of this try running the first as root and then do the chown second:

curl -f -s https://getchannels.com/dvr/setup.sh | env DOWNLOAD_ONLY=1 sh
chown -R channels:channels channels-dvr

still with nologin in sbin or change back to bin?

Use whatever nologin thing worked.

root@channels:/usr/local # curl -f -s https://getchannels.com/dvr/setup.sh | env
 DOWNLOAD_ONLY=1 sh                                                             
Downloading Channels DVR 2018.01.30.0033 (freebsd-x86_64) to /usr/local/channels
-dvr.....                                                                       
Channels DVR has been downloaded.                                               
root@channels:/usr/local # chown -R channels:channels channels-dvr              
root@channels:/usr/local # sysrc channels_dvr_user=channels                     
channels_dvr_user:  -> channels                                                 
root@channels:/usr/local # sysrc channels_dvr_group=admin                       
channels_dvr_group:  -> admin                                                   
root@channels:/usr/local # curl -f -s https://getchannels.com/dvr/install-freebs
d.sh | sh                                                                       
channels_dvr_enable:  -> YES                                                    
cd: ./data: No such file or directory                                           
root@channels:/usr/local # /bin/sh: cannot create channels-dvr.log: Permission d
enied

let me try with group=channels

The group command doesn’t do anything. The script only takes a user now.

I see the problem, that last install command isn’t quite right.

sysrc channels_dvr_user=channels
curl -f -s https://getchannels.com/dvr/install-freebsd.sh -o channels-dvr/install.sh
chmod +x channels-dvr/install.sh
sh channels-dvr/install.sh

up and running, but I tried to verify using the command you gave earlier and got nothing back

ps aux | grep channels-dvr

I assume thats normal?

Seems not normal if it was showing it running before as root.

Maybe you need to do it inside the iocage?

thats where I ran it

Huh. Maybe try outside then? Or ps auxwww | grep channels

root@channels:~ # ps auxwww | grep channels                                     
channels 25235  0.0  0.0 134024 20184  -  SJ   22:12   0:00.34 /usr/local/channe
ls-dvr/latest/channels-dvr                                                      
root     25623  0.0  0.0  14828  1852  1  S+J  22:20   0:00.00 grep channels
1 Like

Ok, this is almost final, I’ll have to edit with instructions and finish sylinking my transcode directory and make that an optional step for anyone else… let me just check working permissions for recording first

echo '{"pkgs":["curl","ca_root_nss","sudo"]}' > /tmp/pkg.json
iocage create -n "channels" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.77/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage exec channels mkdir /usr/local/etc/rc.d
iocage exec channels "pw user add channels -c channels -u 820 -d /nonexistent -s /usr/bin/nologin"
iocage console channels
pw groupadd -n admin -g 1000
pw groupmod admin -m channels
cd /usr/local 
mkdir -p channels-dvr 
curl -f -s https://getchannels.com/dvr/setup.sh | env DOWNLOAD_ONLY=1 sh
chown -R channels:channels channels-dvr
sysrc channels_dvr_user=channels
curl -f -s https://getchannels.com/dvr/install-freebsd.sh -o channels-dvr/install.sh
chmod +x channels-dvr/install.sh
sh channels-dvr/install.sh
echo 'channels_dvr_enable="YES"' >> /etc/rc.conf
exit
iocage fstab -a channels /mnt/storage/dvr /dvr nullfs rw 0 0
iocage fstab -a channels /mnt/transcode/channels /streaming nullfs rw 0 0 
iocage exec channels 'sysrc ifconfig_epair0_name="epair0b"'
iocage restart channels

This could most likely be done completely with “iocage exec” commands but it’ll do for now.

Permission are working properly! I’m going to take a break and update the iocage guide thread in a little bit.

1 Like

@tmm1 ran into another small issue, the symlink isn’t working properly to move the transcode operations over to a different dataset when given these commands…

iocage fstab -a channels /mnt/transcode/channels /streaming nullfs rw 0 0
iocage exec channels ln -nsf /streaming /dvr/Streaming

getting errors as well…

2018/03/12 23:03:28 [HLS] Starting transcoder for channel 736 from 192.168.1.113 (encoder=libx264, resolution=, deinterlacer=blend, bitrate=10000)
2018/03/12 23:03:29 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:03:42 [HLS] Stopping transcoder session ch736-dANY-ip192.168.1.113 @ 11.968023s
2018/03/12 23:03:42 [TNR] Closed connection to 13225028 for ch736
2018/03/12 23:04:18 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:04:30 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:05:18 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:05:30 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:06:18 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:06:30 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:07:18 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:07:30 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable
2018/03/12 23:07:54 [ERR] bonjour: failed to handle query v6: write udp [::]:5353->[fe80::842:31df:7859:7c2%epair0b]:5353: sendmsg: network is unreachable

Bonjour errors show that ipv6 is not configured in the jail. Should still work fine over ipv4

Not sure about transcoding since you didn’t say what’s “not working”

sorry, transcoding is “working” it just isn’t performing it in the other directory. That mount is from a separate ssd and after the symlink that ssd still doesn’t show any activity during the transcode process, but I can see the drive in the main pool are being used for it.

Doesn’t sound like the symlink was created then.

ls -al /dvr

root@channels:~ # ls -al /dvr                                                   
total 52                                                                        
drwxrwxr-x+  6 1000      admin     8 Mar 12 22:36 .                             
drwxr-xr-x  20 root      wheel    24 Mar 12 22:23 ..                            
-rwxrwxr-x+  1 1000      admin  8196 Mar 12 23:06 .DS_Store                     
-rw-rw-rw-   1 root      wheel     0 Mar 12 20:07 .windows                      
drwxrwxr-x+  6 channels  admin     6 Mar 12 23:01 Database                      
drwxrwxr-x+  2 channels  admin     2 Mar 12 22:36 Images                        
drwxrwxr-x+  3 channels  admin     3 Mar 12 22:35 Logs                          
drwxrwxr-x+  2 channels  admin     3 Mar 12 23:03 Streaming