LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-28-2004, 07:53 AM   #1
everythingand2
Member
 
Registered: Oct 2003
Location: Kansas City, MO
Distribution: Slackware 9.1
Posts: 61

Rep: Reputation: 15
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
 
Old 02-28-2004, 08:01 AM   #2
natalinasmpf
Member
 
Registered: Dec 2003
Distribution: Slackware 9.1
Posts: 309

Rep: Reputation: 30
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.
 
Old 02-28-2004, 08:05 AM   #3
everythingand2
Member
 
Registered: Oct 2003
Location: Kansas City, MO
Distribution: Slackware 9.1
Posts: 61

Original Poster
Rep: Reputation: 15
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.
 
Old 02-28-2004, 09:11 AM   #4
everythingand2
Member
 
Registered: Oct 2003
Location: Kansas City, MO
Distribution: Slackware 9.1
Posts: 61

Original Poster
Rep: Reputation: 15
bump...

anybody?
 
Old 02-28-2004, 03:13 PM   #5
everythingand2
Member
 
Registered: Oct 2003
Location: Kansas City, MO
Distribution: Slackware 9.1
Posts: 61

Original Poster
Rep: Reputation: 15
eh?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with shell scripts thorney Linux - Newbie 4 11-27-2005 11:18 PM
Shell scripts on the web thegeekster Linux - General 2 06-15-2004 05:49 PM
shell scripts rocketgo Linux - General 10 12-01-2003 05:20 AM
shell scripts nautilus_1987 Linux - General 3 08-30-2002 03:12 AM
Need Help with Shell Scripts!!!!!!!!!!! vicsharps Linux - Newbie 3 03-07-2002 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration