`ping` fails for normal users with `ping: socket: Operation not permitted` on a minimal image.
IntermediateTroubleshootingPermissions, ownership, SELinux and mounts
Answer
Likely causes → ping lost its file capability (cap_net_raw) when copied or installed by a tool that strips xattrs, and unprivileged ICMP sockets are disabled.
Diagnose →
getcap /usr/bin/ping
sysctl net.ipv4.ping_group_range
Fix → sudo setcap cap_net_raw+ep /usr/bin/ping, or allow ICMP sockets: sysctl -w net.ipv4.ping_group_range="0 2147483647" (persist in /etc/sysctl.d/). Reinstalling the iputils package also restores it.
Prevent → Use image build tools that preserve xattrs (tar --xattrs).
More on Permissions, ownership, SELinux and mounts
nginx returns 403 and logs `open() "/srv/www/index.html" failed (13: Permission denied)`, even after `chmod -R 777 /srv/www`.IntermediateA script fails with `bash: ./deploy.sh: Permission denied` even though `ls -l` shows `-rwxr-xr-x`.BeginnerA script fails with `/bin/bash^M: bad interpreter: No such file or directory`.BeginnerA user gets `-bash: cd: /srv/project: Permission denied` although they're in the group that owns `/srv/project` (mode `770`).BeginnerApache can't connect to a backend: `AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed` and `ausearch` shows `denied { name_connect }`.IntermediateA service fails to bind to a custom port: `bind() to 0.0.0.0:8888 failed (13: Permission denied)` while running as root.Intermediate