i have defined a rule in the sudoers file so a specific user is able to run some commands as sudo with no password.
my question is: is it possible to restrict a user to run commands as sudo only in a certain directory? for example: chown only the files that are located in /var/tmp.
Thank you.
*EDIT*:solved the problem
sb008
March 19, 2010, 9:31am
2
noam128:
i have defined a rule in the sudoers file so a specific user is able to run some commands as sudo with no password.
my question is: is it possible to restrict a user to run commands as sudo only in a certain directory? for example: chown only the files that are located in /var/tmp.
Thank you.
*EDIT*:solved the problem
Create a script which restricts "chown" to files /var/tmp only.
Grant the specific user the right to execute the script you created with root privileges using sudo (sudoers file)
noam128:
i have defined a rule in the sudoers file so a specific user is able to run some commands as sudo with no password.
my question is: is it possible to restrict a user to run commands as sudo only in a certain directory? for example: chown only the files that are located in /var/tmp.
Thank you.
*EDIT*:solved the problem
Would you please share how you solved this issue?
Thx!