I have following config:
version: "3.8"
configs:
mycustom:
file: ./mycustom.cnf
services:
db:
image: mariadb:10.2
configs:
- source: mycustom
target: /etc/mysql/conf.d/custom.cnf-test
uid: '10000'
gid: '10000'
mode: 0440
the file is mounted, but the permission mask is totally ignored (I tried removing leading 0 from octal, other uid/gid, nothing matters):
root@03027f798793:/# ls -al /etc/mysql/conf.d/
total 20
drwxr-xr-x 1 root root 4096 Apr 25 07:44 .
drwxr-xr-x 1 root root 4096 Aug 2 2022 ..
-rwxrwxrwx 1 root root 222 Apr 24 12:48 custom.cnf-test
-rw-r--r-- 1 root root 527 May 18 2022 mariadb.cnf
-rw-r--r-- 1 root root 36 May 18 2022 mysqld_safe_syslog.cnf