I just want to know how to make a file executable only for certain group.
I have a file /bin/ping with this permissions
rwxr-xr-x root root 34248 oct 14 2010 /bin/ping
How do I make it only executable for users of a group called "friends", for example?
If the group "friends" already exist, you can change group by
chown root:friends /bin/ping
and then make it exucutable for that group by
chmod g+x /bin/ping
I'd use ACL for this. First revoke permissions for everyone else with standard unix permissions
chmod 754 /bin/ping
then set rule for your group
setfacl -m "g:friends:r-x" /bin/ping
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With