I have two users userA and userB. userA has permission over a file named
cache. I want to give permission to userB to remove the file. I have made following entry in
/etc/sudoers file :
userB ALL=(userA) NOPASSWD:/bin/rm /opt/cache
When I type
sudo -u userA /bin/rm /opt/cache, it says permission denied. However cache has
777 permission. Please let me know where I am doing it wrong.