All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gavin Henry <ghenry@suretecsystems.com>
To: netfilter@lists.netfilter.org
Subject: Re: iptables permission problem in perl scripts
Date: Sun, 14 Aug 2005 09:27:51 +0100	[thread overview]
Message-ID: <200508140927.52746.ghenry@suretecsystems.com> (raw)
In-Reply-To: <3115d56e05081400344964ebcd@mail.gmail.com>

On Sunday 14 Aug 2005 08:34, afshin lamei wrote:
> Dear all,
> I have a cgi script, which uses some perl scripts in which i'm running
> iptables command using "system" function, like this:
> myfile.pl:
> ......
> system("iptables -F FORWARD")
> ......
>
> the cgi file is owned by root/root and is run by user nobody.
> myfile.pl is owned by root/root, and I've it setuid (chmod u+s
> myfile.pl ; chown root:nobody myfile.pl) to be able to run iptable
> commands, but it returns this error:
> /////
> modprobe: Can't locate module ip_tables.
> iptables v1.2.11: can't initialize iptables table `nat': Permission
> denied (you must be root) perhaps iptables or your kernel needs to be
> upgraded.
> /////
> what's the solution?

Use "sudo"

You can grant apache permission or another user etc.


-- 
Kind Regards,

Gavin Henry.
Open Source. Open Solutions(tm).

http://www.suretecsystems.com/


  reply	other threads:[~2005-08-14  8:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-14  7:34 iptables permission problem in perl scripts afshin lamei
2005-08-14  8:27 ` Gavin Henry [this message]
2005-08-15  5:47 ` Grant Taylor
2005-08-15  9:17   ` /dev/rob0
2005-08-15  6:12 ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2005-08-14  9:29 psihozefir
2005-08-15  5:44 ` Grant Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200508140927.52746.ghenry@suretecsystems.com \
    --to=ghenry@suretecsystems.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.