Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: permissions

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1


    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 ?


  2. #2
    Linux Newbie
    Join Date
    Sep 2012
    Nashville, TN
    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