0

I have two users (Administrator, Normal). I want that the Administrator is able to read, write, execute and delete files inside specific folder while Normal user is unable to create, write and delete files inside that folder while he can only execute a specific script which is inside that folder, the script requires reading of other files inside that folder.

  1. Is it is possible to execute the script from by Normal user on behalf of Administrator without giving Administrator’s password?? Or
  2. Can we make a script which is run by Normal user while giving password in encrypted format??

Using Sticky Bit my problem cannot be solved as it is used to avoid deletion of a folder and its content by other users though they have write permissions on folder contents.

1
  • Have you tried sudo or setuid bit?
    – recluze
    May 9, 2014 at 5:00

1 Answer 1

0

When you execute a script as the user Normal the script will have Normal's privileges. You cannot execute a Administrator script that require his privileges as Normal. However you could change user in your script using su Administrator. You will enter the password and then be logged in as Administrator temporary in that script.

1
  • I tried sudo & setuid bit (SUID/SGID) but still not working. The file which I want to run is: openerp-server.py #!/usr/bin/env python import openerp if __name__ == "__main__": openerp.cli.main() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: After setting setuid and even giving full privileges on file to user, the error is File "/home/inovtec/OpenERP/openerp-7.0/openerp-server", line 2, in <module> import openerp ImportError: No module named openerp The error is due to the user don’t have access privileges on openerp folder and I want not to give user privileges May 13, 2014 at 8:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .