binhex / arch-sabnzbdvpn

Docker build script for Arch Linux base with SABnzbd, Privoxy and OpenVPN
GNU General Public License v3.0
49 stars 9 forks source link

Synology - Root User #9

Closed DonaldSchelle closed 5 years ago

DonaldSchelle commented 5 years ago

Hello,

I'm trying to configure this under DSM6.2. By default Synology DSM disables the root user. After looking at the logs, I'm seeing the following:

iptables v1.6.2: can't initialize iptables table `filter': Permission denied (you must be root)

Is there any way to make this docker container work without enabling the root user?

My PUID and PGID are 1026 and 101 (both are administrator groups).

binhex commented 5 years ago

in order for this container to operate you must be able to create iptables rules, as well as creating the require tunnel adapter, ensure you are creating the container with the required params as shown in the readme:-

--cap-add=NET_ADMIN

or if that doesnt work try using

--privileged=true

one question for you, is the docker daemon running as root?.

DonaldSchelle commented 5 years ago

Thanks for the speedy response. Regarding the docker daemon running as root, I'm not entirely sure. But I do know that by default the root account is disabled on Synology DSM6 and above.

I think I may have found a solution from another docker containers instructions:

This is what I did to get the transmission docker container working and the tips in here may well prove to get this container running as well. I'll report back with my findings, though candidly it may take a few days to figure all this out.

DonaldSchelle commented 5 years ago

That did it!! I had another Synology server with the above transmission-vpn docker installed. So all of the ground work was complete. In the Synology Docker GUI, I selected the "Execute container using high privilege" which is the equivalent of cap-add=NET_ADMIN. Once complete, the docker container booted up and SABnzbd came to life. Checking the docker logs shows that OpenVPN connected, changed IPtables, etc.

Thanks again for the speedy response and for developing this container. Much appreciated!