Script

Discussion in 'Python' started by zze-Support activite PCL RAMSI A ext DvSI/SIReS/LA, Aug 4, 2003.

  1. Hello everybody,

    I try to execute an ifconfig command in my python code using:
    stat, wdsout = commands.getstatusoutput("./script.sh " + interface + " "
    + ipadrr)

    The script.sh executes the ifconfig command as:
    Ifconfig $1 plumb && ifconfig $1 $2 netmawk 255.255.255.0 up

    this script is created by the root, and have 4755 as chmod.

    When the script is executed by th root, it works normaly but when it's
    launched from the python file it doesn't work:
    and i have a Permission denied message.

    Is something wrong in what I do?

    Thanks in advance.
    zze-Support activite PCL RAMSI A ext DvSI/SIReS/LA, Aug 4, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wet Basement
    Replies:
    1
    Views:
    2,518
    BobMonk
    Jul 15, 2003
  2. dpackwood
    Replies:
    3
    Views:
    1,794
  3. P McGinness
    Replies:
    0
    Views:
    296
    P McGinness
    Jan 14, 2004
  4. Rajat
    Replies:
    3
    Views:
    694
    Jorgen Grahn
    Jan 8, 2010
  5. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    554
    Jan Kaliszewski
    Jan 7, 2010
Loading...

Share This Page