The specifications of the board I am using are as follows:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.54-7.1.0-devel-g8de35b780872 #1-Torizon SMP PREEMPT Mon Nov 25 16:38:54 UTC 2024
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree =/ostree/boot.1/torizon/6c6d5766f69270798477063a8e27f581de86f6b73b5bfac94c785339d3578ba7/0
Distro name: NAME="Torizon OS"
Distro version: VERSION_ID=7.1.0-devel-20241128-build.107
Distro variant: VARIANT="Docker"
Hostname: verdin-imx8mp-15141602
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus WB on Verdin Development Boa rd
Toradex version: 0058 V1.1A
Serial number: 15141602
Processor arch: aarch64
------------------------------------------------------------
I am working on a C# program in Visual Studio Code that generates a log.txt file within a Docker container. To ensure data persistence, I am attempting to mount a volume to store the log.txt file in the local storage of the Toradex board.
The relevant files are attached to this email:
• Program.cs: Contains the program code.
• docker-compose.yml:
services:
consoleapp-debug:
restart: always
build:
context: .
dockerfile: Dockerfile.debug
image: ${LOCAL_REGISTRY}:5002/consoleapp-debug:${TAG}
ports:
- ${DEBUG_SSH_PORT}:${DEBUG_SSH_PORT}
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- DOTNET_RUNNING_IN_CONTAINER=true
- DOTNET_USE_POLLING_FILE_WATCHER=true
volumes:
- logvolume:/home/torizon/app/log
consoleapp:
restart: always
build:
context: .
dockerfile: Dockerfile
image: ${DOCKER_LOGIN}/consoleapp:${TAG}
volumes:
- logvolume:/home/torizon/app/log
volumes:
logvolume:
The Issue:
When I run the program without mounting the volume, it works perfectly without any errors. However, when I attempt to mount the volume to make the log.txt file persistent, the program encounters the following permission error:
[+] Running 1/1
✔ Container torizon-consoleapp-debug-1 Started 0.8s
* Terminal will be reused by tasks, press any key to close it.
* Executing task: rsync -P -av --no-o --no-g -e ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /home/torizon/consoleApp/bin/Debug/net8.0/linux-arm64/publish/ torizon@192.168.0.41:/home/torizon/app
Warning: Permanently added '[192.168.0.41]:2222' (ED25519) to the list of known hosts.
sending incremental file list
rsync: [generator] failed to set times on "/home/torizon/app/.": Operation not permitted (1)
./
BouncyCastle.Cryptography.dll
32,768 0% 0.00kB/s 0:00:00 rsync: [receiver] mkstemp "/home/torizon/app/.BouncyCastle.Cryptography.dll.5kfSIq" failed: Permission denied (13)
7,161,624 100% 13.96MB/s 0:00:00 (xfr#1, to-chk=19/21)
Google.Protobuf.dll
473,376 100% 926.42kB/s 0:00:00 (xfr#2, to-chk=18/21)
K4os.Compression.LZ4.Streams.dll
84,992 100% 166.00kB/s 0:00:00 (xfr#3, to-chk=17/21)
K4os.Compression.LZ4.dll
70,656 100% 137.72kB/s 0:00:00 (xfr#4, to-chk=16/21)
K4os.Hash.xxHash.dll
13,312 100% 25.90kB/s 0:00:00 (xfr#5, to-chk=15/21)
MySql.Data.dll
1,186,816 100% 2.17MB/s 0:00:00 (xfr#6, to-chk=14/21)
System.Configuration.ConfigurationManager.dll
32,768 7% 61.19kB/s 0:00:06 rsync: [receiver] mkstemp "/home/torizon/app/.Google.Protobuf.dll.5gFqfW" failed: Permission denied (13)
442,632 100% 762.36kB/s 0:00:00 (xfr#7, to-chk=13/21)
System.Diagnostics.EventLog.dll
51,872 100% 89.18kB/s 0:00:00 (xfr#8, to-chk=12/21)
System.IO.Pipelines.dll
79,512 100% 136.46kB/s 0:00:00 (xfr#9, to-chk=11/21)
System.IO.Ports.dll
74,536 100% 127.70kB/s 0:00:00 (xfr#10, to-chk=10/21)
System.Security.Cryptography.ProtectedData.dll
36,616 100% 62.62kB/s 0:00:00 (xfr#11, to-chk=9/21)
System.Security.Permissions.dll
114,448 100% 195.39kB/s 0:00:00 (xfr#12, to-chk=8/21)
System.Windows.Extensions.dll
27,424 100% 46.50kB/s 0:00:00 (xfr#13, to-chk=7/21)
ZstdSharp.dll
rsync: [receiver] mkstemp "/home/torizon/app/.K4os.Compression.LZ4.Streams.dll.VBOWDG" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.K4os.Compression.LZ4.dll.f3Zdai" failed: Permission denied (13)
32,768 7% 55.46kB/s 0:00:06 rsync: [receiver] mkstemp "/home/torizon/app/.K4os.Hash.xxHash.dll.ey1zSP" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.MySql.Data.dll.3fdCA7" failed: Permission denied (13)
411,136 100% 691.05kB/s 0:00:00 (xfr#14, to-chk=6/21)
consoleApp
72,568 100% 121.56kB/s 0:00:00 (xfr#15, to-chk=5/21)
consoleApp.deps.json
30,560 100% 51.19kB/s 0:00:00 (xfr#16, to-chk=4/21)
consoleApp.dll
5,120 100% 8.58kB/s 0:00:00 (xfr#17, to-chk=3/21)
consoleApp.pdb
12,344 100% 20.68kB/s 0:00:00 (xfr#18, to-chk=2/21)
consoleApp.runtimeconfig.json
257 100% 0.43kB/s 0:00:00 (xfr#19, to-chk=1/21)
libSystem.IO.Ports.Native.so
14,744 100% 24.65kB/s 0:00:00 (xfr#20, to-chk=0/21)
rsync: [receiver] mkstemp "/home/torizon/app/.System.Configuration.ConfigurationManager.dll.CKBC9e" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.System.Diagnostics.EventLog.dll.kzQQZl" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.System.IO.Pipelines.dll.cE7EWt" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.System.IO.Ports.dll.xL2MQD" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.System.Security.Cryptography.ProtectedData.dll.i4nwbF" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.System.Security.Permissions.dll.zP8ALE" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.System.Windows.Extensions.dll.oExhwi" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.ZstdSharp.dll.loLzPW" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.consoleApp.QpxGRV" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.consoleApp.deps.json.xHLEWd" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.consoleApp.dll.MKRUzt" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.consoleApp.pdb.gVZiAb" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.consoleApp.runtimeconfig.json.sgEP5V" failed: Permission denied (13)
rsync: [receiver] mkstemp "/home/torizon/app/.libSystem.IO.Ports.Native.so.Kfo3Ll" failed: Permission denied (13)
sent 10,368,617 bytes received 399 bytes 6,912,677.33 bytes/sec
total size is 10,364,545 speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
* The terminal process "rsync '-P', '-av', '--no-o', '--no-g', '-e', 'ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null', '/home/torizon/consoleApp/bin/Debug/net8.0/linux-arm64/publish/', 'torizon@192.168.0.41:/home/torizon/app'" terminated with exit code: 23.
* Terminal will be reused by tasks, press any key to close it.
-------------------------------------------------------------------
Interestingly, I attempted to mount a volume in a MySQL container directly via the board terminal (without using Visual Studio Code), and it worked seamlessly without any issues.
I would greatly appreciate your guidance on resolving this issue. Let me know if you need more information about the project.
Thank you in advance for your time and support
docker-compose.yml (678 Bytes)
Program.cs (958 Bytes)