Operating System - HP-UX
1748067 Members
5519 Online
108758 Solutions
New Discussion юеВ

Re: How create an srwx------ file

 
SOLVED
Go to solution
Carme Torca
Super Advisor

How create an srwx------ file

Hi,

I need to create one file like

srwx------ 1 root root 0 Jul 15 19:10 file1

How could I do it?
Thanks a lot of!
Carmen.
Users are not too bad ;-)
5 REPLIES 5
Jeeshan
Honored Contributor

Re: How create an srwx------ file

this is a special kind of permission setting user ID in file permission.

#chmod o+s

check the man pages

#man chmod
a warrior never quits
Horia Chirculescu
Honored Contributor

Re: How create an srwx------ file

The command:

#chmod o+s

whould set the 's' flag for others.

You should use chmod u+s for the owner (root in your case)

Best regards from Romania,
Horia.
Best regards from Romania,
Horia.
Matti_Kurkela
Honored Contributor
Solution

Re: How create an srwx------ file

The "s" in the _first_ position is NOT a permission bit: it is a file type identifier. It means this is not a regular file, but a UNIX socket.

Creating a UNIX socket on the command line is not usually very meaningful, because the socket is tied to the process that created it: once it ends, the socket is automatically removed. Therefore, it is not possible to create a socket with shell commands and then generically "give" it to some process: the process that needs the socket must itself create it.

Just start the program that requires the socket: you'll find it creates the socket automatically if it's properly configured.

If you are writing a program that needs to create and use a UNIX socket, see "man 7 unix" for more information.

MK
MK
Horia Chirculescu
Honored Contributor

Re: How create an srwx------ file

Matti Kurkela has the right answer...

The "s" in the _first_ position "...." It means this is not a regular file, but a UNIX socket.

Horia.
Best regards from Romania,
Horia.
Jeeshan
Honored Contributor

Re: How create an srwx------ file

yeah, Matti was right. mistakenly read your query.

Please see this link for file types in unix systems.

http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html
a warrior never quits