/container: Permission denied (13)

Hello.

I am using docker container in RB5009UPr+S+ with RouterOS 7.6

Some containers does not start because “Permission denied (13)”.


/container envs
add name=phpmyadmin key=PMA_HOST value=172.17.0.4
/container
add remote-image=phpmyadmin:latest interface=veth4 root-dir=disk1/phpmyadmin envlist=phpmyadmin logging=yes

10:41:50 container,info,debug import successful, container 772a7f2f-3e38-4b7f-a365-6fe1767bd26f
10:41:57 container,info,debug [23-Oct-2022 13:41:57] ERROR: failed to open error_log (/proc/self/fd/2): Permission denied (13)
10:41:57 container,info,debug [23-Oct-2022 13:41:57] ERROR: failed to post process the configuration
10:41:57 container,info,debug [23-Oct-2022 13:41:57] ERROR: FPM initialization failed


/container envs
add name=phpmyadmin key=PMA_HOST value=172.17.0.4
/container
add remote-image=phpmyadmin:fpm-alpine interface=veth4 root-dir=disk1/phpmyadmin envlist=phpmyadmin logging=yes

10:31:10 container,info,debug import successful, container 9ac4440a-4dd7-402a-9856-2d945b4ee175
10:31:28 container,info,debug AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.5. Set the ‘ServerName’ directive globally to suppress this
message
10:31:28 container,info,debug (13)Permission denied: AH00091: apache2: could not open error log file /var/log/apache2/error.log.
10:31:28 container,info,debug AH00015: Unable to open logs

It also happens with these cotainers:

  • openspeedtest/latest:latest
  • httpd:latest
/container/add remote-image=openspeedtest/latest:latest logging=yes interface=veth3 root-dir=disk1/openspeedtest

/container/add remote-image=httpd:latest logging=yes interface=veth4 root-dir=disk1/httpd

Please, can anyone help me with it.

Regards.

wordpress is not working:


/container/add remote-image=wordpress:php7.4-apache interface=veth4 root-dir=disk1/wordpress logging=yes

12:41:19 container,info,debug import successful, container 34429066-3c6a-4198-a04f-aebf2c64a348
12:41:38 container,info,debug WordPress not found in /var/www/html - copying now…
12:41:49 container,info,debug Complete! WordPress has been successfully copied to /var/www/html
12:41:51 container,info,debug AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.5. Set the ‘ServerName’ directive globally to suppress this
message
12:41:51 container,info,debug (13)Permission denied: AH00091: apache2: could not open error log file /var/log/apache2/error.log.
12:41:51 container,info,debug AH00015: Unable to open logs


Regards.

Disk1 one is attached storage I presume - is it formatted as Ext4?

Edit - just tried on a CHR and I get the same permissions errors. Are there any variables that should be set? Any mountpoints according to the image documentation?

So map /var/log/apache2 to a volume the container can write to.

i don’t know if this a good solution, but this work
Untitled.png

Worked for me on the Openspeedtest container thanks!:

add dst=/var/log/nginx name=openspeed src=/disk1/openspeed/var

Thank you for reporting this, we found main cause for this issue, but it will take same time until fix will be available. Currently as workaround please mount /var/log as explained by previous posters.

Is this related to SUP-92866? Been waiting a while for container permission fixes already… please try fix it soon, as the permission issues are holding back a lot of progress as we can’t deploy any containers until the permission bug is resolved
Thnx:-)

Fix for this will be available in next upcoming versions