maartenweyns Posted October 27, 2021 Share Posted October 27, 2021 (edited) Hi! Lately, a bunch of my docker containers started having trouble writing to their /tmp folders. They always mention permission denied. Dockers with this problem include but are not limited to Nextcloud, WordPress, MariaDB, Baikal, ... I haven't been able to find a fix for this, neither have I been able to identify why this is happening. However, I need this fixed ASAP. I am using unRAID version 9.6.2 Thanks! Edited October 27, 2021 by maartenweyns Quote Link to comment
HellB0yIRL Posted October 27, 2021 Share Posted October 27, 2021 Hi, I have the same issue - i have to change the permission using chmod 777 manually. I also ran the docker permission check\fix but still have the same issue. Thanks Quote Link to comment
ab5g Posted October 28, 2021 Share Posted October 28, 2021 +1 to the issue. Reinstalled the flash drive again. Copied contents from the old /boot/config directory and I am seeing the same errors related to permission on the /tmp. Quote Link to comment
Hammy Havoc Posted November 22, 2021 Share Posted November 22, 2021 (edited) Yes, I've been having the same problem since I started using Unraid. It isn't the end of the world, but it is very annoying to need to remember to change the permissions of my Nextcloud's folder in tmp after a reboot. Can anybody shine any light on this problem? Edited November 22, 2021 by Hammy Havoc Quote Link to comment
trurl Posted November 23, 2021 Share Posted November 23, 2021 Unless you map /tmp to host storage, each container has its own /tmp folder, and that would be inside that container's image within docker.img where it can't be easily affected by anything such as new perms or Unraid command line unless you go to a command line inside the container. Does anybody on this thread have anything they can show such as error messages or screenshots? Quote Link to comment
MewFortyTwo Posted November 23, 2021 Share Posted November 23, 2021 (edited) Hello, I have the issue too. After a reboot of Unraid, the /tmp and /var/tmp folders are set with permissions 755 in every docker containers. To correct this, I have to chmod 777 the folders and the permissions remain set to 777 even after a container restart. I also tried to disable/enable the Docker service via Unraid GUI and the same issue occured. So it seems to come from either the service shutdown or start. I did this test again but the issue didn't occured. I certainly did it wrong the first time, sorry for that 😅 I'm on Unraid 6.9.2 with Docker 20.10.5. As example, I have a container running the image of linuxserver/mariadb, when this container launches, mariadb will log this error [ERROR] mariadbd: Can't create/write to file '/var/tmp/ibXXXXXX' (Errcode: 13 "Permission denied") Edited November 23, 2021 by MewFortyTwo Correct after having redone a test Quote Link to comment
trurl Posted November 23, 2021 Share Posted November 23, 2021 6 minutes ago, MewFortyTwo said: /tmp and /var/tmp folders are set with permissions 755 in every docker containers. Do you mean you actually went to the command line within each container to see this? (click container icon, select >_ Console) Quote Link to comment
Hammy Havoc Posted November 23, 2021 Share Posted November 23, 2021 13 hours ago, trurl said: Unless you map /tmp to host storage, each container has its own /tmp folder, and that would be inside that container's image within docker.img where it can't be easily affected by anything such as new perms or Unraid command line unless you go to a command line inside the container. Does anybody on this thread have anything they can show such as error messages or screenshots? My container config for `/tmp` is set to `/tmp/nextcloud/`. Nextcloud is the only container I'm having problems with in regards to this (to my knowledge at least), everything else seems to work just fine, and I'm running a lot of containers. Sorry I can't be helpful, I'm not hugely familiar with Unraid's implementation of Docker. Silly question of the day: as this folder is showing up in `/tmp/nextcloud/`, does this mean that it isn't actually within the docker.img itself? And is this thus not a recommended/advisable configuration? :- ) Quote Link to comment
trurl Posted November 23, 2021 Share Posted November 23, 2021 1 hour ago, Hammy Havoc said: Silly question of the day: as this folder is showing up in `/tmp/nextcloud/`, does this mean that it isn't actually within the docker.img itself? And is this thus not a recommended/advisable configuration? :- ) /tmp on the host is in OS rootfs. OS rootfs is in RAM. The OS is unpacked fresh from the archives on flash at each reboot, and runs completely in RAM. Think of it as firmware. So using /tmp on the host will not survive. Also if you fill up rootfs the OS will misbehave since it won't be able to work with its own files. Only mounted storage persists. 1 Quote Link to comment
MewFortyTwo Posted November 23, 2021 Share Posted November 23, 2021 4 hours ago, MewFortyTwo said: I also tried to disable/enable the Docker service via Unraid GUI and the same issue occured. So it seems to come from either the service shutdown or start. I did this test again but the issue didn't occured. I certainly did it wrong the first time, sorry for that 😅 4 hours ago, trurl said: Do you mean you actually went to the command line within each container to see this? (click container icon, select >_ Console) I did this test on command line within five differents container with differents images and for the five the permissions of /tmp and /var/tmp was reset to 755 after an Unraid full reboot. There is the list of the image name : factoriotools/factorio linuxserver/mariadb linuxserver/nextcloud linuxserver/nginx phpmyadmin/phpmyadmin Quote Link to comment
mgutt Posted December 15, 2021 Share Posted December 15, 2021 As I have the same problem, I "solved" if by creating the dirs on boot time with chmod 777 permissions through the Go file: # ------------------------------------------------- # Correct wrong container path permissions on server reboot # ------------------------------------------------- mkdir -m 777 -p /tmp/nginx-proxy-manager/var/log mkdir -m 777 -p /tmp/pihole/var/log/lighttpd It seems the permissions are set different if a container is created or started (and the dirs do not exist). But I'm still testing... Quote Link to comment
maartenweyns Posted February 10, 2022 Author Share Posted February 10, 2022 So have there been any updates on this? This problem is still happening for me, especially after a server restart or anything similar. Quote Link to comment
mcdax Posted February 12, 2022 Share Posted February 12, 2022 (edited) Same goes for me. It's a real pain ... After each restart I have to change the permissions of /tmp and /var/tmp for ~7 containers. Edited February 12, 2022 by mcdax Quote Link to comment
Squid Posted February 12, 2022 Share Posted February 12, 2022 18 minutes ago, mcdax said: Same goes for me. It's a real pain ... After each restart I have to change the permissions of /tmp and /var/tmp for ~7 containers. On 12/15/2021 at 2:40 PM, mgutt said: As I have the same problem, I "solved" if by creating the dirs on boot time with chmod 777 permissions through the Go file: # ------------------------------------------------- # Correct wrong container path permissions on server reboot # ------------------------------------------------- mkdir -m 777 -p /tmp/nginx-proxy-manager/var/log mkdir -m 777 -p /tmp/pihole/var/log/lighttpd It seems the permissions are set different if a container is created or started (and the dirs do not exist). But I'm still testing... Quote Link to comment
mcdax Posted February 12, 2022 Share Posted February 12, 2022 (edited) For that you have to mount the container-tmp directory to your host-tmp directory. Sure, it helps, but it sounds like a nasty workaround to me. Same as my solution: docker container exec sabnzbd chmod 777 /tmp docker container exec mariadb chmod 777 /tmp ... If I run the same images on my workstation with docker(-compose), I don't have such problems. Edited February 12, 2022 by mcdax Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.