CentOS: How to prevent a user from executing an application installed in a specific directory
- by slayernoah
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.