CentOS: How to prevent a user from executing an application installed in a specific directory

Posted by slayernoah on Super User See other posts from Super User or by slayernoah
Published on 2013-11-08T21:36:47Z Indexed on 2013/11/08 21:59 UTC
Read the original article Hit count: 225

Filed under:
|
|
|
|

I have an application installed in /etc/mydir.

I have executed the following to remove the ability for users to execute this program.

chown root:group1 /etc/mydir -R
chmod 700 /etc/mydir -R

I created a new user and logged in as this user. The new user was not added to group1 However, I was able to execute this program by just typing the program name.

How can I stop users being able to run this using chmod and chown. Please let me know.

PS. the new users cannot cd into /etc/mydir but they can still execute using the program name.

© Super User or respective owner

Related posts about security

Related posts about permissions