Thanks again for your help! I’ve tried your new version and good news, the VPN from Private Internet Access is now working! I had to change the config filename from “pia” to “pia.ovpn” but then it worked.
As for SMB: I have a external drive connected to my Home Assistant host, which is mounted to /mnt/data (and therefor inaccessible by addons). I could mount the drive to /usr/share/hassio/media instead and have it available for all addons but I rather keep it seperated and manually mount it via Samba for those addons that need it (and this is the only one so far).
I’ve tried your different approaches for mounting and this is my full log now:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 0
User gid: 0
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
chown: cannot access '/config/data/qBittorrent': No such file or directory
[cont-init.d] 30-config: exited 0.
[cont-init.d] 30-nginx.sh: executing...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
100 622 100 622 0 0 280 0 0:00:02 0:00:02 --:--:-- 280
43 3321k 43 1444k 0 0 459k 0 0:00:07 0:00:03 0:00:04 459k
100 3321k 100 3321k 0 0 918k 0 0:00:03 0:00:03 --:--:-- 3994k
[cont-init.d] 30-nginx.sh: exited 0.
[cont-init.d] 91-configuration.sh: executing...
[10:16:33] INFO: Downloads can be found in /mnt/Data
[10:16:33] INFO: Whitelisted subsets will not require a password : localhost,127.0.0.1,172.30.0.0/16,10.0.0.0/16
[10:16:33] INFO: WEBUI username set to admin
[10:16:33] INFO: Default username/password : admin/adminadmin
[10:16:33] INFO: Configuration can be found in /config/qBittorrent
[cont-init.d] 91-configuration.sh: exited 0.
[cont-init.d] 92-smb_mounts_v1.2.sh: executing...
[10:16:34] INFO: Mounting smb share(s)...
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
/var/run/s6/etc/cont-init.d/92-smb_mounts_v1.2.sh: line 70: bashio::log.critical: command not found
[cont-init.d] 92-smb_mounts_v1.2.sh: exited 127.
[cont-init.d] 93-openvpn.sh: executing...
[10:16:34] INFO: Configuring openvpn
[10:16:34] INFO: openvpn correctly set, please modify manually qbittorrent options to select it
sed: -e expression #1, char 66: unknown option to `s'
[cont-init.d] 93-openvpn.sh: exited 1.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Mon Apr 26 10:16:34 2021 WARNING: file '/etc/openvpn/credentials' is group or others accessible
Mon Apr 26 10:16:34 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 5 2019
Mon Apr 26 10:16:34 2021 library versions: OpenSSL 1.1.1f 31 Mar 2020, LZO 2.10
Mon Apr 26 10:16:34 2021 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Apr 26 10:16:36 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]143.244.41.31:1198
Mon Apr 26 10:16:36 2021 UDP link local: (not bound)
Mon Apr 26 10:16:36 2021 UDP link remote: [AF_INET]143.244.41.31:1198
Mon Apr 26 10:16:36 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Apr 26 10:16:37 2021 [amsterdam420] Peer Connection Initiated with [AF_INET]143.244.41.31:1198
Mon Apr 26 10:16:38 2021 OpenVPN ROUTE6: OpenVPN needs a gateway parameter for a --route-ipv6 option and no default was specified by either --route-ipv6-gateway or --ifconfig-ipv6 options
Mon Apr 26 10:16:38 2021 OpenVPN ROUTE: failed to parse/resolve route for host/network: 2000::/3
Mon Apr 26 10:16:38 2021 TUN/TAP device tun0 opened
Mon Apr 26 10:16:38 2021 /sbin/ip link set dev tun0 up mtu 1500
Mon Apr 26 10:16:38 2021 /sbin/ip addr add dev tun0 10.30.112.76/24 broadcast 10.30.112.255
Mon Apr 26 10:16:38 2021 /etc/openvpn/up.sh tun0 1500 1553 10.30.112.76 255.255.255.0 init
[10:16:38] INFO: Starting NGinx...
Notice the warning about ‘/etc/openvpn/credentials’ and the ‘sed’ expression that failed about OpenVPN. It still works though. This is the config I use: https://www.privateinternetaccess.com/openvpn/openvpn.zip (I use the Netherlands config).
I believe Samba not mounting is a security measure from Docker which can only be properly circumvented by running the container in privileged mode. I tried to mount the several commands directly from the host (so not in the container), and they all ran succesfully:
root@minos:/tmp# # test full
root@minos:/tmp# umount /tmp/data
root@minos:/tmp# mount -v -t cifs -o rw,relatime,vers=default,cache=strict,username=milenco,password=somepassword,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 //10.0.0.100/Data/Data /tmp/data
mount: //10.0.0.100/Data/Data mounted on /tmp/data.
root@minos:/tmp# mount|grep /tmp/data|grep 10.0.0.100
//10.0.0.100/Data/Data on /tmp/data type cifs (rw,relatime,vers=default,cache=strict,username=milenco,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
root@minos:/tmp# # test smbv1
root@minos:/tmp# umount /tmp/data
root@minos:/tmp# mount -v -t cifs -o rw,relatime,vers=1.0,cache=strict,username=milenco,password=somepassword,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 //10.0.0.100/Data/Data /tmp/data
mount: //10.0.0.100/Data/Data mounted on /tmp/data.
root@minos:/tmp# mount|grep /tmp/data|grep 10.0.0.100
//10.0.0.100/Data/Data on /tmp/data type cifs (rw,relatime,vers=1.0,cache=strict,username=milenco,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=131007,echo_interval=60,actimeo=1)
root@minos:/tmp# #test smbv3
root@minos:/tmp# umount /tmp/data
root@minos:/tmp# mount -v -t cifs -o rw,relatime,vers=3.0,cache=strict,username=milenco,password=somepassword,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 //10.0.0.100/Data/Data /tmp/data
mount: //10.0.0.100/Data/Data mounted on /tmp/data.
root@minos:/tmp# mount|grep /tmp/data|grep 10.0.0.100
//10.0.0.100/Data/Data on /tmp/data type cifs (rw,relatime,vers=3.0,cache=strict,username=milenco,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
root@minos:/tmp# # test security
root@minos:/tmp# umount /tmp/data
root@minos:/tmp# mount -v -t cifs -o username=milenco,password=somepassword,sec=ntlmv2 //10.0.0.100/Data/Data /tmp/data
mount: //10.0.0.100/Data/Data mounted on /tmp/data.
root@minos:/tmp# mount|grep /tmp/data|grep 10.0.0.100
//10.0.0.100/Data/Data on /tmp/data type cifs (rw,relatime,vers=default,sec=ntlmv2,cache=strict,username=milenco,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
root@minos:/tmp# # test domain
root@minos:/tmp# umount /tmp/data
root@minos:/tmp# mount -v -t cifs -o username=milenco,password=somepassword,domain=WORKGROUP //10.0.0.100/Data/Data /tmp/data
mount: //10.0.0.100/Data/Data mounted on /tmp/data.
root@minos:/tmp# mount|grep /tmp/data|grep 10.0.0.100
//10.0.0.100/Data/Data on /tmp/data type cifs (rw,relatime,vers=default,cache=strict,username=milenco,domain=WORKGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.100,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)