LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Need help with shell scripts via the web (https://www.linuxquestions.org/questions/linux-general-1/need-help-with-shell-scripts-via-the-web-151517/)

everythingand2 02-28-2004 07:53 AM

Need help with shell scripts via the web
 
I have a shell script that I want to run using a PHP script from the web. The shell script works fine when run from the command line but when I run it from the web, the files created by the script are owned by "nobody" and the group is set to "nobody" as well. This in turn will not allow the shell script to execute completely and cleanly. Is there a way to set a default owner and group on files created in a certain directory? It seems like everything done from the web sets the owner and group to "nobody" and unfortunately this won't allow my script to complete. Can anyone offer any advice or suggestions? Thanks.

- Brad

natalinasmpf 02-28-2004 08:01 AM

Pardon my ignorance, but why don't you have the script suid in as a normal user, then have it execute?

I mean I am thinking it is good to have web scripts as "nobody" else you would have the same situation as the infamous bypass of ActiveX controls. ;)

everythingand2 02-28-2004 08:05 AM

The script does have an suid of a normal user, but because it is run from the web it is being run by "nobody" per se. Which means the files that are created by the script have the owner and group of "nobody". If I run the script from a command line the files created are owned by the user running the script.

everythingand2 02-28-2004 09:11 AM

bump...

anybody?

everythingand2 02-28-2004 03:13 PM

eh?


All times are GMT -5. The time now is 02:40 PM.