http://qs1969.pair.com?node_id=219661

c has asked for the wisdom of the Perl Monks concerning the following question:

I just found that in copying a couple of CGI scripts from a RedHat7.2 machine to RedHat7.3 the new kernel imposes some restrictions that does not allow scripts setuid. This causes a great deal of havoc for two that I wrote that make use of Passwd::Linux. Has anyone touched on this in their coding? Any way around this limitation?

Replies are listed 'Best First'.
Re: Not setuid in new Linux kernel
by grantm (Parson) on Dec 13, 2002 at 18:09 UTC

    I don't have recent experience with setuid Perl scripts since for the last few years I have used sudo to solve that class of problems. It might take you an hour to get your head around it, but it is very very good.

Re: Not setuid in new Linux kernel
by dakkar (Hermit) on Dec 13, 2002 at 19:37 UTC

    setuid scripts have a long history of security problems... see perlsec.

    Since you are talking about CGI, you might want to look into suEXEC (browse your Apache docs). It allows you to execute your scripts as any user.

    -- 
            dakkar - Mobilis in mobile