I want to give a user access to commands under visudo, but I want to limit their abilities. I know I can limit which commands they can run, but can I limit where they can run them?
For the limitation of mistakes, I could just limit the PWD that they can run chmod, chown, etc.
But I would also like to add in a security-grade limitation. Is there a way I could prevent the following
cd /authorized-location; chown restricted-user ../unauthorized location?
Would I need to change the PATH and only permit a customized chown, or could I use some syntax in
visudo that would allow me to add this security measure?
If the best I can do is limit the PWD, then would you please tell me how? Because I don't really want to take the time to set up a custom chown, chmod, etc.