Trouble With Portainer

Creating a bug report/issue

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=7 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng G_LIVE_PATCH_STATUS[0]='not applicable'
  • Distro version | bullseye 0
  • Kernel version | Linux DietPi 5.15.56-v8+ #1575 SMP PREEMPT Fri Jul 22 20:31:26 BST 2022 aarch64 GNU/Linux
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | (EG: 5V 2A )
  • SD card used | (EG: Blank Brand)

Additional Information (if applicable)

  • Software title | Portainer
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. Install Portainer
  2. Install Syncthing via Portainer(from: Docker Hub)

Expected behaviour

-Attach the volumes to the external harddrive and its working.

Actual behaviour

Attach the volumes to the external harddrive with exfat format, already tried with ext4 same output.
4.Inside Syncthing getting error: WARNING: Failed to save config: chmod /config/config.xml: operation not permitted.

Tried to change manually sudo chown -R dietpi:dietpi /mnt/b_data_120gb/ but I’m getting this error.

Terminal error output:

chown: changing ownership of '/mnt/b_data_120gb/System Volume Information/WPSettings.dat': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/System Volume Information': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/custom-cont-init.d': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/custom-services.d': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/cert.pem': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/key.pem': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/Sync': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/config.xml.v0': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/LOCK': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/LOG': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/000008.log': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/MANIFEST-000009': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/000004.ldb': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/CURRENT': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/000005.ldb': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db/CURRENT.bak': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/index-v0.14.0.db': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/https-cert.pem': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/https-key.pem': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/csrftokens.txt': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config/config.xml': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_config': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/syncthing_data1': Operation not permitted
chown: changing ownership of '/mnt/b_data_120gb/': Operation not permitted

And Syncthing keep printing this error:

Syncthing error output:

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    1000
User gid:    1000
-------------------------------------
chown: changing ownership of '/config': Operation not permitted
cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/90-custom-folders
chown: changing ownership of '/config/custom-cont-init.d': Operation not permitted
chown: changing ownership of '/config/custom-services.d': Operation not permitted
cont-init: info: /etc/cont-init.d/90-custom-folders exited 1
cont-init: info: running /etc/cont-init.d/99-custom-files
[custom-init] no custom files found exiting...
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun syncthing (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started
2022/08/18 12:17:24 WARNING: chmod /config: operation not permitted
2022/08/18 12:17:24 WARNING: chmod /config: operation not permitted
[start] 2022/08/18 12:17:24 INFO: syncthing v1.20.4 "Fermium Flea" (go1.18.5 linux-arm64) root@7a85b3693d82 2022-08-17 15:30:34 UTC [noupgrade]
[BA5JG] 2022/08/18 12:17:25 INFO: Overall send rate is unlimited, receive rate is unlimited
[BA5JG] 2022/08/18 12:17:25 INFO: Using discovery mechanism: 
[BA5JG] 2022/08/18 12:17:25 INFO: Using discovery mechanism: global discovery server 
[BA5JG] 2022/08/18 12:17:25 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[BA5JG] 2022/08/18 12:17:25 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[BA5JG] 2022/08/18 12:17:25 INFO: TCP listener ([::]:22000) starting
[BA5JG] 2022/08/18 12:17:25 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
2022/08/18 12:17:25 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
[BA5JG] 2022/08/18 12:17:25 INFO: GUI and API listening on [::]:8384
[BA5JG] 2022/08/18 12:17:25 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[BA5JG] 2022/08/18 12:17:25 INFO: My name is "e529035f4758"
[BA5JG] 2022/08/18 12:17:25 INFO: QUIC listener ([::]:22000) starting
[BA5JG] 2022/08/18 12:17:25 INFO: quic://0.0.0.0:22000 detected NAT type: Full cone NAT
[BA5JG] 2022/08/18 12:17:25 INFO: quic://0.0.0.0:22000 resolved external address quic://94.60.226.241:39614 (via stun.syncthing.net:3478)
[BA5JG] 2022/08/18 12:17:39 INFO: Detected 1 NAT service
[BA5JG] 2022/08/18 12:18:10 INFO: Joined relay relay://5.135.177.35:22067
[BA5JG] 2022/08/18 12:18:35 WARNING: Saving config: chmod /config/config.xml: operation not permitted
[BA5JG] 2022/08/18 12:18:40 WARNING: Failed to save config: chmod /config/config.xml: operation not permitted
[BA5JG] 2022/08/18 12:18:56 WARNING: Saving config: chmod /config/config.xml: operation not permitted
[BA5JG] 2022/08/18 12:18:56 INFO: GUI and API listening on [::]:8384
[BA5JG] 2022/08/18 12:18:56 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[BA5JG] 2022/08/18 12:19:01 WARNING: Failed to save config: chmod /config/config.xml: operation not permitted

Ok first thing what me makes to wonder: ExFat doesn’t know any permissions, so it’s weird the operation is not permitted, since everything on a exfat drive should be 0777? And it’s also weird this happens as root, also with ext4.

I searched a bit and it seems like there is something called a “immutable flag” you can set. (never heard of it before).
You can try sudo chattr -i -R /mnt/b_data_120gb/ and then try again the chown command.

as well could you share the configuration of the docker container how your have mapped the drive?

as well pls

ls -la  /mnt/b_data_120gb/

and

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

Got this print from sudo chattr -i -R /mnt/b_data_120gb/
Operation not supported while reading flags on /mnt/b_data_120gb/

where? which tool? Which command? Some more information would be very helpful.

Print from container config:
Image

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

NAME        FSTYPE LABEL        SIZE RO TYPE MOUNTPOINT        PARTUUID                             UUID
sda                           111.8G  0 disk
└─sda1      exfat  data_120gb 111.8G  0 part /mnt/b_data_120gb 72b7ea30-b2b5-01d8-18f5-5bb95a59ec00 72B7-EA30
mmcblk0                        29.2G  0 disk
├─mmcblk0p1 vfat                128M  0 part /boot             df909cde-01                          441B-9770
└─mmcblk0p2 ext4                 29G  0 part /                 df909cde-02                          952cc7ca-2953-4406-bd25-9dd2feee5eac

ls -la /mnt/b_data_120gb/

total 516
drwxrwxr-x 5 root dietpi 131072 Aug 18 12:13  .
drwxr-xr-x 7 root root     4096 Aug 18 11:47  ..
drwxrwxr-x 2 root dietpi 131072 Aug 18 04:49 'System Volume Information'
drwxrwxr-x 6 root dietpi 131072 Aug 18 12:19  syncthing_config
drwxrwxr-x 2 root dietpi 131072 Aug 18 12:06  syncthing_data1

Thank you :blush:

Is there a need to use exfat? I highly recommend to use ext4.

BTW: Syncthing is available on our software catalogue. Is there a need to have it installed on Docker?

I think it is expected to not work on filesystems with no UNIX permissions support, i.e. all FAT variants. exFAT is mounted with dietpi:dietpi 0775/0664 modes, which can be changed in /etc/fstab. Using 777 by default would be bad for security reasons.

The errors and outputs indicate that you’re still using exFAT, please try again with ext4 and in case post again the error logs/outputs.

My main machine uses Windows so if something weird happens with the sd of the SBC, I can access my files with no struggle, just plug it into a external reader and it’s done. I don’t need to rely on some programs like Ext2Fsd… and get BSD as I did in the past.
I’m divided between NTFS or exFAT, I’m leaning towards NTFS just because of the journaling system.

I know :D, but with docker, again if something weird happens with the sd of the SBC, I have the syncthing config and data in the drive. Just plug another sd with the dock and portainer and is ready to go, don’t need to config folders, devices… I just a matter of time nothing more.

switched the drive to ext4 still have the same issue

print of portainer log

[BW4WM] 2022/08/19 11:24:51 WARNING: Failed to create folder root directory mkdir /data1/code: permission denied
[BW4WM] 2022/08/19 11:24:51 INFO: Ready to synchronize "code" (***********) (sendreceive)
[BW4WM] 2022/08/19 11:24:51 INFO: GUI and API listening on [::]:8384
[BW4WM] 2022/08/19 11:24:51 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[BW4WM] 2022/08/19 11:24:51 INFO: Failed initial scan of sendreceive folder "code" (ysve7-zswrl)
[BW4WM] 2022/08/19 11:24:51 WARNING: Error on folder "code" (***********): folder path missing

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

NAME        FSTYPE LABEL        SIZE RO TYPE MOUNTPOINT        PARTUUID                             UUID
sda                           111.8G  0 disk
└─sda1      ext4   data_120gb 111.8G  0 part /mnt/b_data_120gb ea4236ca-600a-4a73-90a2-465ac53b3088 8bb9042f-e07f-ba42-9e85-1dac761b5ed0
mmcblk0                        29.2G  0 disk
├─mmcblk0p1 vfat                128M  0 part /boot             df909cde-01                          441B-9770
└─mmcblk0p2 ext4                 29G  0 part /                 df909cde-02                          952cc7ca-2953-4406-bd25-9dd2feee5eac

before lanching the synchting image
ls -la /mnt/b_data_120gb/

total 20
drwxr-xr-x 5 root   root   4096 Aug 19 08:12 .
drwxr-xr-x 7 root   root   4096 Aug 19 04:27 ..
drwx------ 2 root   root   4096 Aug 19 07:54 lost+found
drwxrwxr-x 6 dietpi dietpi 4096 Aug 19 11:24 syncthing_config
drwxr-xr-x 2 root   root   4096 Aug 19 08:12 syncthing_data1

after lanching the synchting image
ls -la /mnt/b_data_120gb/

total 20
drwxr-xr-x 5 root   root   4096 Aug 19 08:12 .
drwxr-xr-x 7 root   root   4096 Aug 19 04:27 ..
drwx------ 2 root   root   4096 Aug 19 07:54 lost+found
drwx------ 6 dietpi dietpi 4096 Aug 19 11:24 syncthing_config
drwxr-xr-x 2 root   root   4096 Aug 19 08:12 syncthing_data1

the folder has write permission for user root only. Maybe it would need to be changed to user dietpi. Similar to folder syncthing_config

2 Likes
chown -R dietpi:dietpi /mnt/b_data_120gb/syncthing_data1

With NTFS it should work as well since UNIX permissions support is emulated. But it causes more CPU load compared to now natively by Linux supported exFAT or ext4 of course.

Thank you, I facepalmed myself to justify such stupidity. But I think I have a defective hdd adapter who was generating multiple errors.

True, I will use ext4 just for the sake of performance, thank you.
Does and USB 3.0 has difference on cpu load. I have one here and I already tested and my RasPi4 with the dietpi-drive_manager and it takes minutes to find the hdd, with a 2.0 adapter is in seconds. Is that normal?
Thank you all.

Not that I’m aware of, both, load in CPU load and detection time. It’s probably the adapter which makes the difference and not so much whether it’s attached to USB 2 or USB 3. Should be possible to test by switching the same adapter between ports.

hope you can fix it with a new adapter/HDD

I will buy a new one, and see what happens.
Thank you both @MichaIng, @Joulinar and @Jappe
Is there any discord chat or something similar from the dietpi community?

We thought about it but we decided against something like Discord or Matrix as we are to less people on this very small project. And at the end it would be same people on a chat as we have on our forum or GitHub.