Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-12-2004, 09:01 PM   #1
LQ Newbie
Registered: Oct 2004
Posts: 8

Rep: Reputation: 0
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.

Old 12-13-2004, 02:46 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
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.
Old 12-13-2004, 06:38 PM   #3
LQ Newbie
Registered: Oct 2004
Posts: 8

Original Poster
Rep: Reputation: 0
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 !



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Setting File and Directory Permission in Unix/Linux munawer_hassan LinuxAnswers Discussion 1 03-23-2010 11:40 AM
sockets blocked on local network, can't figure out why Dooberdoink Linux - Networking 5 07-07-2005 01:16 PM
IPC (Message Queues vs. FIFOs vs. Unix-domain Sockets) TedMaul Programming 0 03-18-2004 04:53 AM
MINICOM and UNIX SOCKETS [BHBS]=TK Linux - Networking 0 03-15-2002 03:38 PM
rc.local writing permission problem! krivi Linux - General 15 02-04-2002 07:19 PM > Forums > Non-*NIX Forums > Programming

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration