LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Issues with UNIX Local Sockets permission (https://www.linuxquestions.org/questions/programming-9/issues-with-unix-local-sockets-permission-265719/)

ghoughto 12-12-2004 09:01 PM

Issues with UNIX Local Sockets permission
 
I have written and application that uses local sockets. This all works great
as long as the two applications that are using this IPC are the same user.

When I want to talk to the Server (Which is at root), I get permission denied on the connect.

I have not been able to find a way to change the permissions on the file that is used for this socket, what do I have to do ? It is a different type of bind or what ?

Any help would be greatly appriciated.

Glen

Mara 12-13-2004 02:46 PM

I think that using umask() may help. The value of umask you'd like to set will probably be 0. I'm not sure but umask works with local socket, too. Use man 2 umask to see umask manual page.

ghoughto 12-13-2004 06:38 PM

Thanks Mara, that was perfect advise. Once I used umask
to change the default permissions (I used 755) it all worked
just fine.

Appriciate it !

Glen


All times are GMT -5. The time now is 09:20 AM.