LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-09-2002, 04:47 PM   #1
kires
LQ Newbie
 
Registered: Dec 2000
Location: South Florida
Distribution: True 64
Posts: 5

Rep: Reputation: 0
Angry uid battle: Apache v/s script's owner


Here's the issue:
Apache runs as uid "www". Which is as it should. The scripts run by Apache create files that are owned by www, and cannot be deleted by me, the owner of the scripts. The milieu here is a colo'd box, with a real bastard of an admin who's not about to give me sudo, (can't say I blame him, I know just enough to make the box go all explodey) or let me masquerade as www. What I'm trying to pull out of some orifice is a way to have Apache run scripts as the userid of ther daddy, (me) or at least have the files created by said scripts owned by me. Can this be done without conjuring a C wrapper, or my running my own copy of Apache on the box? Maybe some relative of the most holy "setuid bit", that would work on cgi/perl scripts. Or maybe some arcane line in the .htaccess. or httpd.conf I've overlooked.

-
Kires
I'm an idiot. What's your excuse?
 
Old 01-18-2004, 02:34 PM   #2
nIMBVS
LQ Newbie
 
Registered: Sep 2003
Location: Romania
Distribution: Linux Mint
Posts: 29

Rep: Reputation: 15
I have the exact same problem.

Sorry for bringing up such an old topic, but I did a search and I found this, and I didn't want to start another because it already existed.

So, anyone knows how to solve this problem?
 
Old 01-19-2004, 01:38 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You can either:
1) Get your script to chmod them 777 (not very safe on a shared server)
2) Use another script to delete them.
 
Old 01-19-2004, 03:43 PM   #4
thebell
LQ Newbie
 
Registered: Dec 2003
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
You could install the scripts setuid, if you're absolutely certain they won't change anything they're not supposed to. That way, with luck, they should run as your user, and you'll be able to delete them. Alternatively, see if you can get the script to create its files as 775, and get your friendly sysadmin to add you to the owning group.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script's name doesn't appear in ps ealdaz Linux - General 12 08-21-2005 09:27 PM
Apache: suPHP: how to change UID value? murr4y Linux - Software 1 06-12-2005 04:10 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
[APACHE] change upload owner Creak Linux - Software 0 03-14-2004 05:59 PM
apache, process owner, and rsync/ssh question Kruel Linux - Networking 0 03-01-2002 12:25 PM


All times are GMT -5. The time now is 01:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration