Portainer Permissions Trouble

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
User avatar
sigmatec
Posts: 3
Joined: Thu Jun 10, 2021 1:06 pm

Portainer Permissions Trouble

Post by sigmatec »

Hi Dietpi community, recently I'm having some trouble with Portainer, I configured an nextcloud container in it, but when I'm starting container I think I don't have permissions on the config volume/folder because it can't write the certificate. But I think I configured everything right, if I use
ls -ld
I get
drwxrwxrwx 4 dietpi dietpi 4096 Jun 10 10:42 .
I think it has permissions for dietpi to write.
I don't know what went wrong?
Thanks in advance.
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Portainer Permissions Trouble

Post by Joulinar »

Hi,

first Portainer is just a tool to visualize your docker container. If a container fails or now working, it's most probably not related to Portainer directly. Next to this docker is executed as root user and writing files down to the host OS/file system should not be an issue.

Probably you can share some more information of the issue you are facing. Where do you see the issue? Are you able to share the log from the container?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
sigmatec
Posts: 3
Joined: Thu Jun 10, 2021 1:06 pm

Re: Portainer Permissions Trouble

Post by sigmatec »

The config:
sdasdsdsssss.jpg


The container log:

Code: Select all

-------------------------------------,
          _         (),
         | |  ___   _    __,
         | | / __| | |  /  \ ,
         | | \__ \ | | | () |,
         |_| |___/ |_|  \__/,
Brought to you by linuxserver.io,
-------------------------------------,
To support LSIO projects visit:,
https://www.linuxserver.io/donate/,
-------------------------------------,
GID/UID,
-------------------------------------,
User uid:    1000,
User gid:    1000,
-------------------------------------,
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,
Your DockerHost is most likely running an outdated version of libseccomp,
To fix this, please visit https://docs.linuxserver.io/faq#libseccomp,
Some apps might not behave correctly without this,
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 20-config: executing... ,
[cont-init.d] 20-config: exited 0.,
[cont-init.d] 30-keygen: executing... ,
generating self-signed keys in /config/keys, you can replace these with your own keys if required,
Generating a RSA private key,
......+++++,
................+++++,
writing new private key to '/config/keys/cert.key',
-----,
1996415888:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:,
[cont-init.d] 30-keygen: exited 1.,
[cont-init.d] 40-config: executing... ,
[cont-init.d] 40-config: exited 0.,
[cont-init.d] 50-install: executing... ,
[cont-init.d] 50-install: exited 0.,
[cont-init.d] 60-memcache: executing... ,
[cont-init.d] 60-memcache: exited 0.,
[cont-init.d] 70-aliases: executing... ,
[cont-init.d] 70-aliases: 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.,
nginx: [emerg] cannot load certificate "/config/keys/cert.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/config/keys/cert.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file),
nginx: [emerg] cannot load certificate "/config/keys/cert.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/config/keys/cert.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file),
nginx: [emerg] cannot load certificate "/config/keys/cert.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/config/keys/cert.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file),
The image link:
https://hub.docker.com/r/linuxserver/nextcloud

I think it is a problem of permission to docker, the container can't write the certificate. The container still tries to find certificate but no success.
Thank you again :)
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Portainer Permissions Trouble

Post by Joulinar »

it looks more of an issue of the container not able to get correct time, as the error during self signed certificate creation is:

Code: Select all

SN1_TIME_adj:error getting time
probably you can ask the maintainer of the docker image what the issue could be
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
sigmatec
Posts: 3
Joined: Thu Jun 10, 2021 1:06 pm

Re: Portainer Permissions Trouble

Post by sigmatec »

You are right

The issue:
Your DockerHost is most likely running an outdated version of libseccomp,
To fix this, please visit https://docs.linuxserver.io/faq#libseccomp,
Both work (both solve the problem):
https://docs.linuxserver.io/faq#libseccomp,
https://blog.samcater.com/fix-workaroun ... docker-20/

thank you :)
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: Portainer Permissions Trouble

Post by Joulinar »

you installed it from backports?

What system you are running?

Found this post on our GitHub https://github.com/MichaIng/DietPi/issu ... -817189826
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply