Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-09-2002, 04:47 PM   #1
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.

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

Rep: Reputation: 21
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
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
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
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.


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:36 PM.

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