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

Alex Sidorenko asid at sympatico.ca
Thu Nov 11 14:59:31 CET 2004


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 ?

Broadcasting is a privileged operation on Unixes, you need to set
SO_BROADCAST flag. See manpage socket(7).

Hope this helps,
Alex



More information about the Python-list mailing list