Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, when I run a command inside a php script e.g exec("ps awx") it is executed as root, how can I make that command run as normal user that already ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    34

    permissions


    Hi, when I run a command inside a php script e.g exec("ps awx") it is executed as root, how can I make that command run as normal user that already exists ?

    thanks

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Location
    Nashville, TN
    Posts
    98
    Can you supply some of the code that you are executing? I went through the documentation and it appears that the exec command will execute as the owner of the http process. which on CentOS is normally apache or www-data (can't remember). What happens if you create a test script and run the whoami or id command and display the results on screen?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •