0

I created sudo user hrsupport with following commands:

hrsupport ALL=ALL, NOPASSWD: /bin/chown, /bin/chmod, /bin/chgrp, /scripts/pkgacct, /scripts/restorepkg

How can I achieve this

  1. The hrsupport should be able to create & delete files on other directories like /home/someone
  2. The hrsupport not able to cd to home/someone/public_html, which is having nobody as a group
  3. The hrsupportuser should be able to execute only the above commands + Other commands which are common for any users.
  • 4
    You have given unlimited access to chmod, chown and chgrp. The remaining conditions are pointless. – muru Jan 7 '15 at 2:37
  • What are you trying to accomplish? Your proposed half-baked implementation is severely flawed. – Mark Wagner Jan 8 '15 at 1:11
0

After long time, I am able to find the answer.

Problem: ==> The hrsupport not able to cd to home/someone/public_html, which is having nobody as a group

Solution: ==> I added the hrsupport user to the group nobody

Problem Solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.