Hi all, sorry for NOOB question but here I go.
First of all I’d like to thank to all MailCow supporters as this is a wonderfull resource.
My issue is the following:
I have a working MailCow setup but I changed MailDir to an external SAMBA share folowing this official guide.
Instead of pointing to a bind mount I directly pointed maildir volume to my samba share as follows:
I included on /opt/mailcow-dockerized/docker-compose.override.yml
version: '2.1'
volumes:
vmail-vol-1:
driver_opts:
type: cifs
device: "\\192.168.1.1\tank"
o: "username=user,password=passwd,uid=5000,gid=5000,forceuid,forcegid"
So far so good. All works as expected.
Problem is:
if I go to any subdirectory in maildir volume I get all files with different permissions from the same directory if maildir was not mounted on external share. Please note:
Without volume external mount:
root@mail:# ls -la /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/myemail.com.br/lixo/Maildir/
total 48
drwx------ 10 5000 5000 4096 Oct 19 12:04 .
drwx------ 3 5000 5000 4096 Oct 19 12:04 ..
drwx------ 5 5000 5000 4096 Oct 19 12:04 .Archive
drwx------ 2 5000 5000 4096 Oct 19 12:04 cur
-rw------- 1 5000 5000 0 Oct 19 12:04 dovecot-acl-list
-rw------- 1 5000 5000 143 Oct 19 12:04 dovecot-uidlist
drwx------ 5 5000 5000 4096 Oct 19 12:04 .Drafts
drwx------ 5 5000 5000 4096 Oct 19 12:04 .Junk
-rw------- 1 5000 5000 0 Oct 19 12:04 maildirfolder
drwx------ 2 5000 5000 4096 Oct 19 12:04 new
drwx------ 5 5000 5000 4096 Oct 19 12:04 .Sent
-rw------- 1 5000 5000 36 Oct 19 12:04 subscriptions
drwx------ 2 5000 5000 4096 Oct 19 12:04 tmp
drwx------ 5 5000 5000 4096 Oct 19 12:04 .Trash
All files are -rw——- and all dirs are drwx——
With external mount:
root@mail:# ls -la /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/myemail.com.br/lixo/Maildir/
total 2
drwxr-xr-x 2 5000 5000 0 Oct 19 11:52 .
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 ..
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Archive
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 cur
-rwxr-xr-x 1 5000 5000 0 Oct 19 11:45 dovecot-acl-list
-rwxr-xr-x 1 5000 5000 106 Oct 19 11:45 dovecot-uidlist
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Drafts
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Junk
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 new
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Sent
-rwxr-xr-x 1 5000 5000 36 Oct 19 11:45 subscriptions
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 tmp
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Tras
All files are -rwxr-xr-x and all dirs are drwxr-xr-x
I also noted then when I mount the external volume I cannot CHMOD any file. If I try to chmod any file it silently fails. Please see:
root@mail:# chmod 700 /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/myemail.com.br/lixo/Maildir/subscriptions
root@mail:# ls -la /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/myemail.com.br/lixo/Maildir/
total 2
drwxr-xr-x 2 5000 5000 0 Oct 19 11:52 .
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 ..
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Archive
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 cur
-rwxr-xr-x 1 5000 5000 0 Oct 19 11:45 dovecot-acl-list
-rwxr-xr-x 1 5000 5000 106 Oct 19 11:45 dovecot-uidlist
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Drafts
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Junk
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 new
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Sent
-rwxr-xr-x 1 5000 5000 36 Oct 19 11:45 subscriptions
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 tmp
drwxr-xr-x 2 5000 5000 0 Oct 19 11:45 .Trash
Note that subscriptions still -rwxr-xr-x even after chmod 700 that silent fails.
Is it safe these “new” permissions on mounted share?
Why can’t I chmod external mounted share?
My smb.conf on remote host is very permissive:
[tank]
browseable = yes
read only = no
hosts allow = 192.168.0.0/16
path = /tank/j
create mask = 0775
kind regards