Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Steve Johnson on December 06, 2000, 11:12:43 PM

Title: suid in perl?
Post by: Steve Johnson on December 06, 2000, 11:12:43 PM
Does anyone know how to change users in perl? I dont want to change permissions on the users ibay directory to screw up e-smith. What im doing is writing a perl script that creates and deletes files in ibay directories. The problem is that the web server[httpd] is run in user/group www and the ibay directory is protected with the user:group admin:admin so basically I can't write anything into the ibay? Does anyone know how to override that?
Title: RE: suid in perl?
Post by: Luke Drumm on December 07, 2000, 06:35:35 AM
It's your choice, as always, but the general opinion on matters like this tend to be along the lines of:

Don't make your CGI programs run as anything but a non-'sensitive' user.

If you do need to get your CGI programs to do super/normal user style activites, try and make it so that a second set of programs (outside of the Web Servers Document path) actually do the dirty work.
The second set of of programs can be set up to run at the correct security level.
That way your Perl programs can remain 'un-enpowered' and the programs that need to do the more sensitive work are kept safely out of harms way.

I realise this hasn't actually told you how to do anything, but it's something best learnt the 'easy way'.

Regards,
Luke