I need to allow a certain user access to these commands:
sudo sync echo 3 | sudo tee /proc/sys/vm/drop_caches
(This particular developer is doing some DB performance testing and flushing the fs cache gives them cleaner numbers, so please refrain from comments on why we're using this command.)
Can I restrict the user to a very specific command with sudo, e.g.
From what I understand, I can only restrict them to the command
tee itself. I don't want to allow the user to be able to use
tee as root on anything they want, however.
I guess the other option is to give them write access to that particular file, but is that crazy talk, i.e. giving some non-admin write access to a file in
Any pointers or ideas on the best way to restrict this are appreciated.