Re: socket.error:(13,'Permission deied')

Discussion in 'Python' started by Jp Calderone, Nov 11, 2004.

  1. Jp Calderone

    Jp Calderone Guest

    On Thu, 11 Nov 2004 21:08:41 +0800, "Austin" <> wrote:
    >........................
    > data = ....
    > self.broadcast_ip = 255.255.255.255
    >
    > UDPSock.sendto(data,(self.broadcast_ip,36))
    > .........................
    >
    >
    > These codes run on Windows without errors and warnings.
    > But i excute that on Fedora Core 2, it shows the error
    > "socket.error:(13,'Permission deied')"
    > i try to disable the firewall and become a root but it doesn't work, either.
    >
    > Does anyone have any suggestions ?
    >


    Try calling this first:

    UDPSock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)

    Jp
    Jp Calderone, Nov 11, 2004
    #1
    1. Advertising

  2. Jp Calderone

    Austin Guest

    "Jp Calderone" <> ¼¶¼g©ó¶l¥ó·s»D
    :...
    > On Thu, 11 Nov 2004 21:08:41 +0800, "Austin" <>

    wrote:
    > >........................
    > > data = ....
    > > self.broadcast_ip = 255.255.255.255
    > >
    > > UDPSock.sendto(data,(self.broadcast_ip,36))
    > > .........................
    > >
    > >
    > > These codes run on Windows without errors and warnings.
    > > But i excute that on Fedora Core 2, it shows the error
    > > "socket.error:(13,'Permission deied')"
    > > i try to disable the firewall and become a root but it doesn't work,

    either.
    > >
    > > Does anyone have any suggestions ?
    > >

    >
    > Try calling this first:
    >
    > UDPSock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
    >
    > Jp



    now i use
    self.server = BaseHTTPServer.HTTPServer(( '', self.port ),ServerHandler)
    on fedora Core 2
    it shows permission denied, too.
    What could i do?
    Austin, Nov 12, 2004
    #2
    1. Advertising

  3. "Austin" <> wrote:
    > now i use
    > self.server = BaseHTTPServer.HTTPServer(( '', self.port ),ServerHandler)
    > on fedora Core 2
    > it shows permission denied, too.
    > What could i do?



    If you are trying to run a server on a port < 1024 on linux, you need to
    be root (they are "priviledged ports"). Try running on a higher port
    for testing and such, and if you /need/ to run it on port 80 (or
    something else) later, ask again.

    - Josiah
    Josiah Carlson, Nov 12, 2004
    #3
    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. Austin
    Replies:
    1
    Views:
    536
    Alex Sidorenko
    Nov 11, 2004
  2. Laszlo Nagy
    Replies:
    1
    Views:
    4,811
    Mark Wooding
    Jan 27, 2009
  3. Jean-Paul Calderone
    Replies:
    0
    Views:
    962
    Jean-Paul Calderone
    Jan 27, 2009
  4. Laszlo Nagy
    Replies:
    0
    Views:
    542
    Laszlo Nagy
    Feb 1, 2009
  5. Steve Holden
    Replies:
    0
    Views:
    659
    Steve Holden
    Feb 1, 2009
Loading...

Share This Page