adferrand / docker-backuppc

Docker container with BackupPC version 4.x/3.x based on Alpine distribution.
MIT License
72 stars 48 forks source link

Podman Container Problem - ping: socket: Operation not permitted #98

Closed TheMetMan closed 3 days ago

TheMetMan commented 1 month ago

I am running BackupPC version 4.4.0 in a Podman Container inside RHEL9. I upgraded this week from RHEL8. The backups are not working (they were before) because I am getting "No Ping Response" for all the clients. From inside the Container I can ping as root, but as backuppc user I get this: ping: socket: Operation not permitted Here are the permissions on /bin/ping: -rwsr-xr-x 1 root root 64120 Jul 23 2021 /bin/ping Here is my startup script:

BASE_FOLDER=/home/francis/podman-containers/BackupPC/
cd $BASE_FOLDER
podman run -itd \
    --name fg_backuppc \
    --hostname podman-backuppc.fsoft.nnet \
    --publish 8080:8080 \
    --restart=always \
    --volume /var/podman_data/BackupPC/etc/backuppc:/etc/backuppc \
    --volume /var/podman_data/BackupPC/home/backuppc:/home/backuppc \
    --volume /home/backuppc/ToBackup/backuppc-backups:/data/backuppc \
    --env AUTH_METHOD=file \
    --env BACKUPPC_WEB_USER=backuppc \
    --env BACKUPPC_WEB_PASSWD=fsoft31? \
    --env SMTP_HOST=mail.fsoft.nnet \
    --env SMTP_MAIL_DOMAIN=fsoft.nnet \
    adferrand/backuppc 

I have tried the solution in the known Podman Bug found here but it does NOT fix the problem for me, despite restarting the container.

How can I fix this problem, and then get my backups working again?

TheMetMan commented 1 month ago

I found a solution here. I added these two lines to my script, and it works!!!!

--cap-add=IPC_LOCK 
--cap-add=NET_RAW 

This might help others