Stewart Lawton <jstewartlaw...@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 _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor