I need to be able to lock down an sudo user so that they can only run particular commands within some directories they would otherwise only have read access to. eg:
sudo rm A_Protected_File
... but only for the /home/someotheruser directory ... make sense?
Any ideas how this can be done? I'm having a hard time finding info on this, but maybe i'm not using the right search terms.
i'll make sweet sweet love, down by the fire, with anybody who can answer this one for me
I've sort of worked it out, but still doesn't behave as expected. In my sudoers file I have something like this :
Cmnd_Alias CUSTOM = /usr/bin/nano /home/someotheruser/*
and i've attached this alias to a user. I can run the command I need if I provide the *full* path :
however, if I 'cd' to the /home/someotheruser directory I don't have the privelages anymore as i'm no longer accessing the same relative path defined in my sudoers config.