Re: running script via root permission again!!O
| From: | Web Admin | Date: | Tue, 29 Aug 2000 16:11:03 +0000 |
| Subject: | Re: running script via root permission again!!O | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14162@lists.php.net to get a copy of this message | ||
I think i can't write the whole CGI script in C, becuase i have
already done several major parts in perl. actually, once i wrote
all of them in php but changed my mind and wrote them in perl.
what can i do?!
Ahmad Anvari
----- Original Message -----
From: "Aaron Abelard" <aaron@aig4.com>
To: <php-general@lists.php.net>
Sent: Tuesday, August 29, 2000 7:56 PM
Subject: Re: [PHP] running script via root permission again!!O
>
> I suggest witing small C applications that setuid() to whatever
> user you need. Set root ownership and the sticky bit and make
> sure that you're using fgets() and not gets() or other functions
> with buffer overrun holes.
>
> Quoting Web Admin (webadmin@morva.net):
> > Forget about cron, and changing file permissions. changing
> > httpd owner is ok, but i want to do this with least changes
> > on the server itself. How does administration tools written
> > in perl work?!!!!! can anyone help? suppose that you want
> > to write a mail reader in perl, what will you do?!
> > Ahmad
> >
> >
> > ----- Original Message -----
> > From: "Greg Linnell" <greg@william-russell.co.uk>
> > To: "'Web Admin'" <webadmin@morva.net>; "Php3 Help
> > (E-mail)"
> > <php-general@lists.php.net>
> > Sent: Tuesday, August 29, 2000 7:41 PM
> > Subject: RE: [PHP] running script via root permission again!!
> >
> >
> > > Firstly, forget about running perl/php as root, you DO NOT want to do
> > this,
> > > BAD, VERY VERY BAD, I think apache tells you to go away if you try
running
> > > it as root anywayz.
> > >
> > > How about this then for your adding/changeing of users. Use nobody to
> > create
> > > a TO DO list. Then using cron setup a job that reads the TO DO list as
> > root
> > > and then executes the appropriate commands.
> > >
> > > Keep in mind that you do not want somebody to schedule a delete user
root
> > > command. :-)
> > >
> > > Greg
> > >
> > > -----Original Message-----
> > > From: Web Admin [mailto:webadmin@morva.net]
> > > Sent: 29 August 2000 15:54
> > > To: greg@william-russell.co.uk
> > > Subject: Re: [PHP] running script via root permission again!!
> > >
> > >
> > > So, now, who can say how can I run my perl/php scripts
> > > with ROOT permission?!!! that's critical, please reply! read
> > > below, i will be so glad if anyone can help!!
> > > regards,
> > > Ahmad Anvari
> > >
> > >
> > > >
> > > >
> > > > hey gurus,
> > > > i finally couldn't find a suitable way for running my php scripts
> > > > to read and show /var/log/messages in the browser. does
> > > > anyone know how to do that?
> > > > - i changed the file mode to 4755 and chown root.root (X) didnt work
> > > > - tried to change the httpd process owner from nobody to root,
> > > > it can't be changed unless it recompiled and unsecure (X)
> > > > - i dont want to chmod 777 /var/log/messages
> > > >
> > > > can anyone help please?!! you think using sudo is a good solution?
> > > > if yes, could anyone please describe if i have to run httpd using
sudo
> > > > or give tail access of /var/log/messages to nobody?
> > > >
> > > > ---------------------
> > > > 2nd question, i'm writing admin tools for a company to add users and
> > > > change user passwords, etc.. i decided not to write in php3 and
write
> > > > in perl. how can I run perl scripts with root privileges? does chmod
> > > > work? i tried 4755 but it can't still print
tail
> > > > /var/log/messages
> > which
> > > > is owned by root.
> > > >
> > > > Linuxconf
> > > >
> > > >
> > > > This is urgent, please help ASAP!!
> > > > Ahmad Anvari
> > > > Website Admin.
> > > > Morva Network
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
> --
> aaron / aig4.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>