Permission denied when mounuting /var/spool/postfix
Diak opened this issue · 3 comments
Hi,
I'm trying to mount /var/spool/postfix on the host but even when i set chmod 777 postfix won't start because of Permission Denied error.
To mount this folder i've just added this option on docker run command :
podman run -d \
--name postfix \
-v /home/centos/postfix/data/spool:/var/spool/postfix \
....
And the output displays :
ls: can't open '/var/spool/postfix': Permission denied
cp: can't create directory '/var/spool/postfix/active': Permission denied
cp: can't create directory '/var/spool/postfix/bounce': Permission denied
cp: can't create directory '/var/spool/postfix/corrupt': Permission denied
cp: can't create directory '/var/spool/postfix/defer': Permission denied
cp: can't create directory '/var/spool/postfix/deferred': Permission denied
cp: can't create directory '/var/spool/postfix/flush': Permission denied
cp: can't create directory '/var/spool/postfix/hold': Permission denied
cp: can't create directory '/var/spool/postfix/incoming': Permission denied
cp: can't create directory '/var/spool/postfix/maildrop': Permission denied
cp: can't create directory '/var/spool/postfix/pid': Permission denied
cp: can't create directory '/var/spool/postfix/private': Permission denied
cp: can't create directory '/var/spool/postfix/public': Permission denied
cp: can't create directory '/var/spool/postfix/saved': Permission denied
cp: can't create directory '/var/spool/postfix/trace': Permission denied
I use alpine image.
Should i do something specific to make it work ?
Ok i fixed the problem vy addind --privileged option to the run command.
I close the ticket.
Ok i fixed the problem vy addind --privileged option to the run command.
I close the ticket.
This should not be needed, how are you running the container ?
I have this problem on Centos 8.X with podman (dev platform).
I don't need to add this options when I use RHEL 8.X with podman (prod platform).
And i have exactly the same problem with other containers when I declare a volume mapping so it's not this project problem but most probably a podman configuration linked to SELinux i think.