Find the answer to your Linux question:
Results 1 to 5 of 5
Hi: I know that the apache user is www-data. It seems to me that this user does not have a lot of privileges. can anybody let me know is this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    3

    Apache User


    Hi:

    I know that the apache user is www-data. It seems to me that this user does not have a lot of privileges. can anybody let me know is this user can execute shell scripts?

    I have an expect script that spawns an ssh connection. it was not working so I added www-data to the groups ssh, and crontab (This script is cronned), but it is still not working.

    So my question is, does anybody know the limits of the apache user?

  2. #2
    Just Joined! TheBoogyMaster's Avatar
    Join Date
    Apr 2009
    Posts
    51
    it depends if hes path on the profile is /bin/bash if this is tha cas yes...

    but by default i dont think so

  3. #3
    Linux Newbie
    Join Date
    Apr 2008
    Location
    India
    Posts
    170
    Looks like you are using DEBIAN and apache 2 right ?

    You want apache2 to be optimized for better performance or
    to restrict users ..?
    Regards
    David Anand
    -->Success is the list of failures ...!!!

  4. #4
    Just Joined!
    Join Date
    Jun 2009
    Posts
    3
    Thanks TheBoogyMaster. I will read up abut profile paths and get back to you about that.
    @davidanand I am using Ubuntu server and apache2.

    the problem is that I have an expect script and a php web frontend, I am setting a cron job to run the script from the php front end. The cron job is sets (I check it) but the script does not run, which makes me think that www-data is not privileged to run scripts, from what TheBoogeyMaster says, it appears that is right.

  5. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    7
    Have you tried running it from shell of user apache before setting it in cron? Also whats the grp, user and permission set for the script? Is the script trying to write to some file/directory to which it do not have permission? I would suggest to run the script from apache user's command prompt in debugg mode to get more details..
    You can do that from
    su - www-data
    sh -x filename.sh

Posting Permissions

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