Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the "p" permission found on /var/run/screen/ ...?

Tags:

linux

shell

I was wondering if I can do a tail on screen session files, so I went into /var/run/screen/S-Username.

This is what I found on that directory (using ll -l)

XXXX@ubuntu:/var/run/screen/S-XXXX $ ll -a
total 0
drwx------ 2 XXXX XXXX 60 XXXX  5 09:42 ./
drwxrwxr-x 3 root utmp 60 XXXX  5 09:42 ../
prwx------ 1 XXXX XXXX  0 XXXX  5 09:42 3031.pts-1.ubuntu

What permission is this?

I’ve tried googling for “Linux file permissions”, and no one seems to mention the p flag. Can anyone tell me what the p permission flag is?

P.S: Also, it seems that I can’t do cat or tail on that file either.

like image 677
user1894397 Avatar asked Nov 05 '13 02:11

user1894397


People also ask

What does permission 644 represent?

644 - owner can read/write, group/others can read only. Some directory permission examples: 777 - all can read/write/search. 755 - owner can read/write/search, others and group can only search.

What does Rwxrwxrwx permission mean?

Hence the -rwxrwxrwx above indicates that user, group, and other have read, write and execute permissions for that file or in other words: the owner of the file, anyone in the file's group, and everybody else has read, write, and execute permissions for that file).

How do I give permission to run in Linux?

To give the owner all permissions and world execute you would type chmod 701 [filename]. To give the owner all permissions and world read and execute you would type chmod 705 [filename].

What is the execute permission?

The execute permission grants the ability to execute a file. This permission must be set for executable programs, in order to allow the operating system to run them.


2 Answers

p stands for FIFO, a named pipe. So it's not a permission, but a file type (just like d for directory).

You can't use cat or tail to get its content, because a FIFO isn't a regular file, it's used for inter-process communication.

like image 66
Yu Hao Avatar answered Nov 05 '22 14:11

Yu Hao


It's not a permission. The p means that it's a named pipe, not a regular file.

like image 25
hobbs Avatar answered Nov 05 '22 13:11

hobbs