[Tutor] apache python cgi sockets error 13 (resend after joining the tutorial list)
Felix Dietrich
felix.dietrich at sperrhaken.name
Thu May 7 18:46:33 CEST 2015
Stewart Lawton <jstewartlawton at yahoo.co.uk> writes:
> Hi I have tried Python TCPIP sockets and Unix sockets processed in a
> python cgi script, called from apache under fedora19. In both cases a
> permissions error is returned at sock.connect(). I have tried changing
> permissions x and r w on ALL of user, group, other to no avail. In
> both cases the cgi script runs if directly executed from
> /var/www/cgi-bin with no apache involvement.
Make sure that you not only set the permissions for the socket file but
also for the directories leading to the file. The man-pages for AF_UNIX
(man unix) state under the section NOTES:
In the Linux implementation, sockets which are visible in the
filesystem honor the permissions of the directory they are in.
Their owner, group and their permissions can be changed. Creation
of a new socket will fail if the process does not have write and
search (execute) permission on the directory the socket is created
in. Connecting to the socket object requires read/write permission.
> server_address = '../../.././home/johnlawton/workspace/myUnixSock/uds_socket'
You are using a relative path here. Are you certain about the working
directory of the interpreter?
--
Felix Dietrich
More information about the Tutor
mailing list