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?
it depends if hes path on the profile is /bin/bash if this is tha cas yes...
but by default i dont think so
Looks like you are using DEBIAN and apache 2 right ?
You want apache2 to be optimized for better performance or
to restrict users ..?
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.
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