give a permissions to a process that is running as a user to access domain socket and connect to my server

I have a tcp server running on linux and bound to unix domain socket

I want to allow (give permission ) to another process (running as a user) to connect to the server using the same domain socket.

How Can I achieve that ?


Thanks
LVL 2
bachra04Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Likely you'll do this exactly like any other file.

Using normal user + group ids, however you arrange this in your runtime environment.

You might also use setfacl, if you have more complex requirements.

My guess is you'll leave the domain socket user/group/permissions alone + then use setfacl to add ACLs for other users/groups requiring access.

For example, let's say Apache www-data owns a set of files + you'd like to add many users to access different parts of your Apache files.

You'd use a command similar to this...

useradd --user-group -G www-data --shell=/usr/bin/mysecureshell --home=/path user
setfacl -Rm d:u:user:rwX,u:user:rwX /path

Open in new window


The exact user/group/permissions you assign depend on your unique situation.

In your case, you'd skip the useradd, as you'll be using existing users.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.