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.
/etc/mydir
. Trywhich programname
andtype programname
(if bash is your shell) to determine what actually gets called when you typeprogramname
./usr/libexec/mydir
. Once I ranchown
andchmod
on this folder, it worked as expected. I could have marked it as an answer if you typed it below. Thanks for your time!