Closed klara31 closed 1 year ago
Please fill in all info we ask for! Try running it as a normal user and not root.
When running the container as non-root, oscam gives the following error:
2021/02/12 23:10:22 364424E5 r (reader) smargo [smartreader] libusb_open error LIBUSB_ERROR_ACCESS : the user has insufficient permissions
My docker-compose.yml:
oscam:
image: ghcr.io/linuxserver/oscam:latest
privileged: true
container_name: oscam
environment:
- PUID=1000
- PGID=100
- TZ=${TZ}
volumes:
- ${USERDIR}/oscam:/config
- /home/pi/picons/picons:/picons
ports:
- 8888:8888
- 9000:9000
network_mode: bridge
devices:
- /dev/bus/usb/001/004:/dev/bus/usb/001/004
restart: unless-stopped
Removing the privileged: true
has no effect. To get oscam running, I need PUID=0
.
Change the permissions so that the pi user have permissions to the device. Or you can add the ABC user to the same group inside the container as the group on the host.
The user with ID 1000 (pi) is part of the plugdev group and the permissions of the device are:
pi@meter:~ $ id
UID=1000(pi) GID=1000(pi) groepen=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),994(docker),997(gpio),998(i2c),999(spi)
pi@meter:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev docker gpio i2c spi
pi@meter:~ $ ls -la /dev/bus/usb/001/004
crw-rw-r-- 1 root plugdev 189, 3 feb 12 10:05 /dev/bus/usb/001/004
So I think user 1000 should be able to access the device. However, with the docker-compose.yml as stated above, it doesn't...
I forgot it doesn't work like that. The plugdev group is not in the container, so it doesn't help that the user has permissions for it. You can either set the permission on host or try adding the ABC user to the same gid as the plugdev group on the host. If there is no group with the same gid, then add it.
OK, I have changed the following:
environment:
- PUID=1000
- PGID=46
Where PGID=46
is the number for the plugdev group. Oscam is working OK with these settings. However, docker logs still gives the pzapit error
Not like that. You have to add the abc user to the group inside the container that has the gid 46. If there is no group with gid 46, then create it.
You can also just change the owner of the usb to the pi user on host.
I'm not quite sure if I can follow you on the first part. User abc in the container has ID 1000, which is the PUID I am using. User 1000 on the host has access to GID 46. Group plugdev on the host has GID 46. What am I doing wrong?
Regarding initial request - regarding pzapit. According to oscam source code (https://svn.streamboard.tv/oscam/trunk/module-dvbapi.c) we have following:
system("pzapit -rz");
So, if oscam compiled with coolapi/coolapi2 or neutrino - run pzapit -rz on start. In docker oscam we have: DVB API with COOLAPI support: no DVB API with COOLAPI2 support: no DVB API with NEUTRINO support: yes So - it is compiled with neutrino. But zapit (https://github.com/tuxbox-neutrino/gui-neutrino/tree/master/src/zapit) is really absent. I propose to drop neutriono support from docker image. For that we should in Dockerfile modify ./config.sh \ --enable all \ --disable \ CARDREADER_DB2COM \ CARDREADER_INTERNAL \ CARDREADER_STINGER \ CARDREADER_STAPI \ CARDREADER_STAPI5 \ IPV6SUPPORT \ LCDSUPPORT \ LEDSUPPORT \ READ_SDT_CHARSETS \ WITH_NEUTRINO && \
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any news on that?
Feel free to make a PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm having the same error-message, but Oscam is working fine in the container:
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
[cont-init.d] 10-adduser: exited 0. [cont-init.d] 30-config: executing... [cont-init.d] 30-config: exited 0. [cont-init.d] 90-custom-folders: executing... [cont-init.d] 90-custom-folders: exited 0. [cont-init.d] 99-custom-files: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-files: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. sh: pzapit: not found
Judging source-code it is enough to rebuild without NEUTRINO support. Then again, the error does not bother me, but it might confuse others when they're having troubles with the container.
I'll look at removing neutrino when I get time.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity
Expected Behavior
Current Behavior
When starting the container, after a few moments the message
sh: pzapit: not found
appears. The container is running, but oscam is not workingSteps to Reproduce
1. 2. 3. 4.
Environment
OS: CPU architecture: arm64 How docker service was installed: From the official docker repo.
Command used to create docker container (run/create/compose/screenshot)
Docker logs