Solved

my 'sticky fifo (named pipe)' is stuck!

Posted on 1998-11-16
19
425 Views
Last Modified: 2012-05-04
i dont know what a 'sticky fifo (named pipe)' is, but in my home directory i had the dir .gimp (to hold the gimp rc files) and it got messed up and now its a 'sticky fifo (named pipe)'.
the thing is i cant do anything to it.. i cant erase it, change permissions, rename it.. nothing.
how do i get rid of it (and what is a sticky fifo (named pipe)?)

some info:
im running rh5.1, and:
p----w--wT   1 5138     5291            0 May 23  2010 .gimp    

thanks.
0
Comment
Question by:Vickio
  • 10
  • 8
19 Comments
 

Author Comment

by:Vickio
ID: 1638508
Edited text of question
0
 
LVL 2

Expert Comment

by:vx
ID: 1638509
It looks to me like a faulty directory entry: I never heard of the T mode, nor did I find anything in the documentation. I recommend running fsck.

I believe a named pipe is something to which you can redirect your output if the program you want to redirect it from doesn't support piping. But I'm not sure about that.
0
 

Author Comment

by:Vickio
ID: 1638510
fsck doesnt find anything wrong with it....
0
 
LVL 2

Expert Comment

by:vx
ID: 1638511
Are you sure the permissions are: p----w--wT? And which errors is reported when you try to delete the file (directory?)?
0
 

Author Comment

by:Vickio
ID: 1638512
yup, its p----w--wT and if i try to erase, rename, move, change permissions.. any of that stuff, i get "Operation not permitted"
0
 
LVL 2

Expert Comment

by:vx
ID: 1638513
Ah.. it seems to me that you're not the rightful owner of this file (5138     5291). This means that it belongs to user 5138, group 5291. I don't know if these exist, but if you're not one of them, you can't remove this file. Type id to find out which uid you are and in which group (gid) you belong.
0
 

Author Comment

by:Vickio
ID: 1638514
yeah, user 51238 doesnt exist and even if im root i get operation not permitted.
i also get operation not permitted if i try to change the owner or group.
0
 

Author Comment

by:Vickio
ID: 1638515
(that is, user 5138 and group 5291 dont exist)
0
 
LVL 2

Expert Comment

by:vx
ID: 1638516
Perhaps you should try a 'chattr -iR .gimp ; rm -Rf .gimp' or 'chattr -uR .gimp ; rm -Rf .gimp'

By the way, .gimp is a directory? What's inside?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:Vickio
ID: 1638517
when i use chattr (as root) i get:
chattr 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09
chattr: Invalid argument while reading flags on .gimp

its not really a directory anymore.. it used to be untill it got turned into whatever it is now (if i try cd .gimp it says its not a directory).. it just had a coupld rc files for gimp in it.
0
 

Author Comment

by:Vickio
ID: 1638518
i found out that that T bit sets it as sticky.
i cant turn the T bit off (operation not permitted).
0
 
LVL 2

Expert Comment

by:vx
ID: 1638519
I've found some info in the fileutils docs:
(Sticky:)
3. save the program's text image on the swap device so it will load
     more quickly when run (called the "sticky bit").  For directories
     on some systems, prevent users from removing files that they do
     not own in the directory; this is called making the directory
     "append-only".


You could try to set an octal mode: "chmod 0777 .gimp"
0
 

Author Comment

by:Vickio
ID: 1638520
chmod 0777 .gimp
operation not permitted.

hmm...
0
 
LVL 2

Expert Comment

by:vx
ID: 1638521
Looks like we'll have to use some brute force here. I'll dig up some more docs, when I have enough time. I think that will be tomorrow (local time).
0
 
LVL 2

Expert Comment

by:vx
ID: 1638522
I was able to replicate the modes and the file with: "mkfifo --mode=1022 .gimp", but

vx@mars:~$ rm .gimp
rm: remove `.gimp', overriding mode 1022? y

removed the file. You say it was a directory, perhaps you can remove it with rmdir. I don't know the octal code for a directory, but I'm still searching on that.

In the mean time, you could try a "lsattr" on your directory. Perhaps it'll be of any use.
0
 
LVL 2

Expert Comment

by:vx
ID: 1638523
Are you sure e2fsck checked your partition? Most of the time it doesn't and reports the partition is clear. I guess it's on your root partition, so'll you'd better unmount it and check it (use the force switch "e2fsck -f").
0
 

Author Comment

by:Vickio
ID: 1638524
lsattr 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09
lsattr: Invalid argument While reading flags on .gimp

rmdir says its not a dir anymore (so does cd), so i guess, although it was a dir at one time, it couldnt really be considered one now..
0
 

Accepted Solution

by:
joch earned 150 total points
ID: 1638525
According to the manpages of chmod the .gimp dir is now undeletable because of the sticky bit. This bit indicates that the permissions of this moment can't be altered, this is often useful for dir's like /tmp. If you want to change the permissions you have to be the owner of the dir and have the permission set yourself. Another option is that you become superuser (root) so you are then allowed to do to system whatever you want to do.
You also might want to try if chmod -f <useful params> does something useful.
0
 

Author Comment

by:Vickio
ID: 1638526
i have since formatted the partition that had this problem so i dont know if that would have worked. ill give you the points anyway.....

thanks.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now