Change File/Folder Ownership to a Linux User on Different Linux Machine

You mentioned a swarm user on the Linux host as well or something like that as well. Can you show what the swarm user or whatever it is called looks liked with user/group/uid/gid? As you said the swarm user needs to execute/write something on the shared location as it doesn't currently have permission to do so?
 


Can you also show the permissions on the side on of the nas and on the side of the Linux host where that share is mounted. By showing the output on from both systems for the database location?
Code:
ls -l  /database/location
 
You mentioned a swarm user on the Linux host as well or something like that as well. Can you show what the swarm user or whatever it is called looks liked with user/group/uid/gid? As you said the swarm user needs to execute/write something on the shared location as it doesn't currently have permission to do so?
On the NAS,

cat /etc/passwd
naswekan:x:1030:100: <<NAS User naswekan=username x=passwd 1030=UID 100:GID
cat /etc/group
naswekan:x:65536:naswekan <<<NAS Group naswekan=groupname 65536=GID naswekan=groupmember

On the Docker Swarm Linux Machine,
cat /etc/passwd
naswekan:x:1030:65536: <<<Swarm User naswekan=username x=passwd 1030=UID 65536=GID
cat /etc/group
naswekan:x:65536:naswekan <<<Swarm Group groupname=naswekan 65536=GID naswekan=groupmember

Does this help clarify?
 
I think so. So there is no separate user used for swarm, on both systems the only users you are dealing with is the user/group naswekan from my understanding in your latest reply. And you can you share the permissions of the location on both the nas and the Linux system so like this.
On nas.
Code:
ls -l /data/db
On Linux system.
Code:
ls -l /mnt/db
 
Can you also show the permissions on the side on of the nas and on the side of the Linux host where that share is mounted. By showing the output on from both systems for the database location?
Code:
ls -l  /database/location
output from NAS
-rwxrwxrwx+ 1 naswekan naswekan 20480 Jul 14 11:52 collection-0--4087297069838802221.wt
output from docker
-rwxrwxr-x 1 naswekan naswekan 36864 Jun 26 00:19 collection-114--4087297069838802221.wt
It is the same recursively for every Directory and sub directory
 
I think so. So there is no separate user used for swarm, on both systems the only users you are dealing with is the user/group naswekan from my understanding in your latest reply.
The same user with the same values exists on both linux machines. The only difference is the primary GID on the NAS for naswekan is 100. Which is by default the users group ID I believe. But the use does have group membership of the naswekan group. The only difference is that on the NAS the primary ID is 100 and on the docker its primary ID is 65536. But I don't think that matters as the group membership is still there, therefore the permissions are there.
 
Yeah I was thinking there were two different users on each systems that's why I thought about the two different users first. According two how nfs works is because the user naswekan with the uid 1030 exists on both systems with the same information and the permissions are setup on the nas side that the user naswekan is allowed to write on that location. That would mean on the Linux system the user permissions should be the same and they are, which would mean the user should be allowed to write on that location.

What happens when you are logged on the Linux system as that naswekan user and try to create a file(touch test.txt) in the directory where the wekandb files are located just as a test? And what Linux distribution is the Linux system running?
 
Yeah I was thinking there were two different users on each systems that's why I thought about the two different users first. According two how nfs works is because the user naswekan with the uid 1030 exists on both systems with the same information and the permissions are setup on the nas side that the user naswekan is allowed to write on that location. That would mean on the Linux system the user permissions should be the same and they are, which would mean the user should be allowed to write on that location.

What happens when you are logged on the Linux system as that naswekan user and try to create a file(touch test.txt) in the directory where the wekandb files are located just as a test? And what Linux distribution is the Linux system running?
The Linux Distro's are
NAS = Synology NAS appliance. DSM 7.0.1-42218 (Synology DSM is a Linux Distro)

Docker Swarm Linux = Debian V 11
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

If I try to touch a file into the directory..
naswekan@docker1:/mnt/dockerdata/volumes/wekan-db$ touch /mnt/dockerdata/volumes/wekan-db/test.txt
touch: cannot touch '/mnt/dockerdata/volumes/wekan-db/test.txt': Permission denied
 
Can you share the permissions of the volumes location and the wekan-db directory itself?
Code:
ls -l /mnt/dockerdata/volumes /mnt/dockerdata/volumes/wekan-db
 
Can you share the permissions of the volumes location and the wekan-db directory itself?
Code:
ls -l /mnt/dockerdata/volumes /mnt/dockerdata/volumes/wekan-db
Output from /mnt/dockerdata/volumes/, (please understand and note that I have blanked out the names of other directories for privacy reasons.)
drwxrwxrwx 5 52437909 52429313 4096 Jun 28 16:37
drwxrwxrwx 2 52437909 52429313 4096 Jun 28 17:59
drwxrwxrwx 8 debi debi 4096 Jun 28 16:49
drwxrwxrwx 8 debi debi 4096 Jun 28 16:51
drwxrwxrwx 7 debi debi 4096 Jul 20 12:39
drwxrwxrwx 8 debi debi 4096 Jun 28 16:46
drwxrwxrwx 5 debi debi 4096 Jun 28 17:57
drwxrwxrwx 8 debi debi 4096 Jun 28 16:43
drwxrwxrwx 4 debi debi 4096 Jun 28 17:59
drwxrwxrwx 7 debi debi 4096 Jul 18 11:41
drwxrwxrwx 7 debi debi 4096 Jun 28 16:41
drwxrwxrwx 7 debi debi 4096 Jun 28 16:41
drwxrwxrwx 17 debi debi 4096 Jul 20 12:00
drwxrwxrwx 8 debi debi 4096 Jul 13 15:53
drwxrwxrwx 2 debi debi 4096 Jun 14 12:15
drwxrwxrwx 2 debi debi 4096 Jun 28 17:57
drwxrwxrwx 6 debi debi 4096 Jul 15 15:39
-rwxrwxrwx 1 52437909 52429313 0 Apr 26 10:23 'THESE ARE CRITICAL FILES DO NOT TOUCH PLEASE'
drwxrwxrwx 2 debi debi 4096 Jun 29 09:11
drwxrwxrwx 15 debi debi 4096 Jun 29 09:29
drwxrwxrwx 4 naswekan naswekan 12288 Jul 20 12:35 wekan-db
Output from /mnt/dockerdata/volumes/wekan-db
-rwxrwxrwx 1 naswekan naswekan 20480 Jul 14 11:52 collection-0--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 21 09:42 collection-102--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 356352 Jun 26 00:19 collection-105--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 collection-114--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 Jun 26 00:19 collection-117--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jun 26 00:19 collection-120--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 21 09:45 collection-123--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:34 collection-127--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 collection-131--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 collection-137--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 collection-140--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 collection-143--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 24 13:30 collection-147--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 48697344 Jun 24 13:30 collection-150--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jun 2 11:32 collection-153--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 1 13:56 collection-155--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 21 09:48 collection-157--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 08:22 collection-159--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 08:22 collection-161--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 Jun 26 00:19 collection-16--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 172032 Jun 17 08:22 collection-164--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 collection-21--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 1470464 Jul 14 11:52 collection-2--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 collection-27--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 26 00:19 collection-29--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 26 00:19 collection-32--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 14:14 collection-35--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 18 17:01 collection-37--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 53248 Jun 26 00:19 collection-41--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:48 collection-4--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 26 00:19 collection-44--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 24576 Jun 21 10:22 collection-53--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 21 10:22 collection-56--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 26 00:19 collection-59--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 26 00:19 collection-67--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 110592 Jun 26 00:19 collection-71--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 53248 Jun 26 00:19 collection-7--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 collection-76--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 53248 Jun 26 00:19 collection-80--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 98304 Jun 26 00:19 collection-84--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 collection-89--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 collection-93--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 collection-96--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 collection-99--4087297069838802221.wt
drwxrwxrwx 2 naswekan naswekan 655360 Jul 14 15:38 diagnostic.data
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 25 23:45 index-0-5658098134193748554.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-0-975525119126522076.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-100--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-101--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jun 2 14:14 index-103--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 24 06:47 index-10--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 14:15 index-104--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 126976 Jun 23 16:20 index-106--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 90112 Jun 23 16:20 index-107--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 90112 Jun 23 16:20 index-108--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 98304 Jun 24 11:07 index-109--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 77824 Jun 26 00:19 index-110--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 index-111--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 index-112--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 index-113--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-11--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 May 21 07:21 index-115--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-116--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-118--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-119--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 May 21 07:21 index-121--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 May 21 07:21 index-122--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 Jun 7 11:45 index-12--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 May 21 07:21 index-124--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-125--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jun 26 00:19 index-126--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:34 index-128--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:34 index-129--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:34 index-130--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-132--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-133--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 Jun 2 14:14 index-13--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-134--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-135--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 May 21 07:21 index-138--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-139--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jul 14 11:52 index-1--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jun 2 14:14 index-141--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 14:15 index-142--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 25 23:45 index-14--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-144--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-145--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 Jun 26 00:19 index-146--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 24 13:30 index-148--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-149--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-151--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 24 13:30 index-152--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 25 23:45 index-15--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 20480 Jun 2 11:32 index-154--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 1 13:53 index-156--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 21 09:48 index-158--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 08:22 index-160--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 08:22 index-162--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-163--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-165--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 08:22 index-166--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-17--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-18--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:27 index-19--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 1 14:32 index-20--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-22--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-23--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-24--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 4096 Jun 26 00:19 index-25--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 8192 May 21 07:21 index-2-5658098134193748554.wt
-rwxrwxrwx 1 naswekan naswekan 4096 May 21 07:21 index-26--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-28--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 1 13:11 index-30--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 May 21 07:21 index-31--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 12288 Jun 2 11:59 index-33--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 266240 Jul 14 11:52 '~index-3--4087297069838802221.wt'
-rwxrwxrwx 1 naswekan naswekan 12288 May 21 07:21 index-34--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-36--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 18 17:01 index-38--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 18 17:01 index-39--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-40--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 24 13:30 index-42--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 index-45--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-46--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 9 09:15 index-47--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-48--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-49--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-50--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-51--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 24 06:48 index-52--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:48 index-5--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 24576 May 21 08:28 index-54--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 24576 May 21 07:21 index-55--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 24576 May 21 08:28 index-57--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 24576 May 21 07:21 index-58--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-60--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:35 index-61--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-62--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:35 index-63--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 25 23:39 index-6--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 9 09:15 index-64--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-65--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-66--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 index-68--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 2 11:39 index-69--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-70--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 26 00:19 index-72--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:20 index-73--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-74--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-75--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 07:54 index-77--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 17 07:54 index-78--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-79--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 22 11:19 index-81--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 21 09:41 index-82--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-83--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-8--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 61440 Jun 22 11:19 index-85--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 22 11:21 index-86--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 45056 Jun 22 11:19 index-87--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-88--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 1 13:56 index-90--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-91--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 26 00:19 index-92--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 15:56 index-9--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 Jun 23 16:19 index-94--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-95--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-97--4087297069838802221.wt
-rwxrwxrwx 1 naswekan naswekan 36864 May 21 07:21 index-98--4087297069838802221.wt
drwxrwxrwx 2 naswekan naswekan 524288 Jul 14 15:26 journal
-rwxrwxrwx 1 naswekan naswekan 45056 Jul 14 11:52 _mdb_catalog.wt
-rwxrwxrwx 1 naswekan naswekan 0 Jul 14 12:41 mongod.lock
-rwxrwxrwx 1 naswekan naswekan 2355400 Jul 14 15:55 repairchown.txt
-rwxrwxrwx 1 naswekan naswekan 36864 Jul 14 11:52 sizeStorer.wt
-rwxrwxrwx 1 naswekan naswekan 114 May 21 07:21 storage.bson
-rwxrwxrwx 1 1024 users 0 Jul 20 12:35 test.txt - I was able to touch as naswekan after I changed a permission setting in the WEBUI of the NAS. But the repair command still did not work after doing this.
-rwxrwxrwx 1 naswekan naswekan 50 May 21 07:20 WiredTiger
-rwxrwxrwx 1 naswekan naswekan 32768 Jul 14 11:52 WiredTigerHS.wt
-rwxrwxrwx 1 naswekan naswekan 21 Jul 14 12:41 WiredTiger.lock
-rwxrwxrwx 1 naswekan naswekan 1492 Jul 14 11:52 WiredTiger.turtle
-rwxrwxrwx 1 naswekan naswekan 663552 Jul 14 15:26 WiredTiger.wt
 
The permissions look correct and the user naswekan should be able to write there as well as in the database directory location. How was the application/container able write in that location(/mnt/dockerdata/volumes/wekan-db) and to files in that location before the database was corrupted? I'm assuming the database container or application had to be able write there even before the the database was corrupted?
-rwxrwxrwx 1 1024 users 0 Jul 20 12:35 test.txt - I was able to touch as naswekan after I changed a permission setting in the WEBUI of the NAS. But the repair command still did not work after doing this.
Also whois uid 1024 as it seems the test file is created with that uid als owner with group ownership of users? I would have expected that file to be owned by the naswekan user if you ran it as we the naswekan user? And are all the directories in /mnt/dockerdata/volumes different nfs shares or they all shared through the same nfs share from the nas?
 
Last edited:
The permissions look correct and the user naswekan should be able to write there as well as in the database directory location. How was the application/container able write in that location(/mnt/dockerdata/volumes/wekan-db) and to files in that location before the database was corrupted? I'm assuming the database container or application had to be able write there even before the the database was corrupted?

Also whois uid 1024 as it seems the test file is created with that uid als owner with group ownership of users? I would have expected that file to be owned by the naswekan user if you ran it as we the naswekan user? And are all the directories in /mnt/dockerdata/volumes different nfs shares or they all shared through the same nfs share from the nas?
Correct. I created the file as naswekan so the UID should not be 1024.
1024 is the UID of the of the default admin user on the NAS.
admin:x:1024:100:System default user:/var/services/homes/admin:/bin/sh
In the original post, I mention "After restoring the backup, I then had to copy/paste from to our new NAS using windows file explorer. However when I did this, it somehow messed up a whackload of permissions/ownership."
Somehow our NAS\Admin user highjacked the ownership of the folders/subfolders/files when I did this copy/paste using file explorer in Windows.
RIght now the wekan-db folder appears to be inheriting permissions from it's parent folder/folders.
Would disabling inheritance solve this issue? I feel like that would be the only reason why when I touch test.txt as naswekan it ends up with ownership of UID 1024.
I touched another file again just to check it and it did the same thing.
-rwxrwxrwx 1 naswekan naswekan 2355400 Jul 14 15:55 repairchown.txt
-rwxrwxrwx 1 naswekan naswekan 36864 Jul 14 11:52 sizeStorer.wt
-rwxrwxrwx 1 naswekan naswekan 114 May 21 07:21 storage.bson
-rwxrwxrwx 1 1024 users 0 Jul 20 13:10 test2.txt
-rwxrwxrwx 1 1024 users 0 Jul 20 12:35 test.txt
-rwxrwxrwx 1 naswekan naswekan 50 May 21 07:20 WiredTiger
-rwxrwxrwx 1 naswekan naswekan 32768 Jul 14 11:52 WiredTigerHS.wt
-rwxrwxrwx 1 naswekan naswekan 21 Jul 14 12:41 WiredTiger.lock
 
What kind of backup is it, is it a possibility to create a tar or zip of the wekan-db location of the back you have and then copy that file over and unzip/untar it so it gets it's original permissions. Do you know what the permissions and ownership of the files were before you did the restore of the wekan-db directory? You mentioned the database running in a container, is that docker because if I remember correctly docker runs as the docker user and group not as another user such as the naswekan user.
 
What kind of backup is it, is it a possibility to create a tar or zip of the wekan-db location of the back you have and then copy that file over and unzip/untar it so it gets it's original permissions. Do you know what the permissions and ownership of the files were before you did the restore of the wekan-db directory? You mentioned the database running in a container, is that docker because if I remember correctly docker runs as the docker user and group not as another user such as the naswekan user.
Its is Docker. The Docker Containers and swarm are managed by Portainer.
How would I go about doing that? I don't have a backup that contains the original permissions unfortunately. I only have backups that contain the Wekan-db with the wrong permissions we are trying to fix.
 
In my experience most backup solutions restore the directory structure as they were before including permissions. I have no experience with Portainer, is that just an interface to manage docker containers and do the containers still run as the docker user? If so that would mean the docker user would need to have read/write/execute permissions in the location of the wekan-db location recursively in some way.
 
You know if it's NFS-mounted, you can set the parameters for uid and gid upon mount if you can SSH into the NAS as root, you could maybe edit /etc/exports. If so, add all_squash,anonuid=<naswekan's id>,anongid=<naswekan's gid> to the export options. That'd ensure client modifications reflect as the NAS's primary user and ensures everyone on the client is treated as anonuser with permissions to overwrite/modify any/all files (within usual permissions). Lol, if push came to shove, make everything o+rw.

Sorry for the late reply. We're having regular "loadshedding" (planned power outages coz the bloody unions went on strike again just after two generators went down) as well as some unexpected blackouts. Seems to be subsiding now. Still not using my PC just in case (on my phone ATM).
 
Last edited:
In my experience most backup solutions restore the directory structure as they were before including permissions. I have no experience with Portainer, is that just an interface to manage docker containers and do the containers still run as the docker user? If so that would mean the docker user would need to have read/write/execute permissions in the location of the wekan-db location recursively in some way.
Yes that is just a central managment interface for managing the docker containers. It's not technically required, it just makes it so you have a nice WebGUI to manage them instead of having to do CLI all the time. I'll have to check on the docker user thing, but when I was googling a while ago, I was under the impression that if in the YAML script, if a user to run the script is not specified in the script it will run it as root by default. But they and I could be wrong. If that is the case then the docker user would have to exist as one of the users on each linux machine in the swarm and I don't recall seeing it in the /etc/passwd file but I could have missed it. Let me doublecheck that.
 
You know if it's NFS-mounted, you can set the parameters for uid and gid upon mount: mount -t nfs -o rw,uid=<id of naswekan>,gid=<gid of naswekan> blah:blah /mnt; sudo chown you:you /mnt (no -R in chown). IDK, but worth a shot.
Another thing: if you can SSH into the NAS as root, you could maybe edit /etc/exports. If so, add all_squash,anonuid=<naswekan's id>,anongid=<naswekan's gid> to the export options. That'd ensure client modifications reflect as the NAS's primary user and ensures everyone on the client is treated as anonuser with permissions to overwrite/modify any/all files (within usual permissions). Lol, if push came to shove, make everything o+rw.

Sorry for the late reply. We're having regular "loadshedding" (planned power outages coz the bloody unions went on strike again just after two generators went down) as well as some unexpected blackouts. Seems to be subsiding now. Still not using my PC just in case (on my phone ATM).
All good. I am not sure how it is being mounted or how to check that. This whole environment was set up by an employee who has recently left us and left us behind with this environment to deal with so I am still learning my way around it. I have to be careful about messing with too many things as I fear I could end up breaking something else that is working fine.
To set that parameters of the mount would I have to re-mount it from scratch? or is there a way I can modify the mount without dismounting it?
 
All good. I am not sure how it is being mounted or how to check that. This whole environment was set up by an employee who has recently left us and left us behind with this environment to deal with so I am still learning my way around it. I have to be careful about messing with too many things as I fear I could end up breaking something else that is working fine.
To set that parameters of the mount would I have to re-mount it from scratch? or is there a way I can modify the mount without dismounting it?
I wasn't thinking earlier (still getting post-Covid brainfog). I was confusing server/client exports/fstab options, sorry. I updated my answer before you replied. Anyway, you'd have to make the changes to /etc/exports on the server as per my update and then run exportfs on said server. Then remount it on the client.
 

Staff online

Members online


Latest posts

Top