Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-13-2009, 09:45 AM   #1
Completely Clueless
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 816

Rep: Reputation: 69
Talking Totally useless file?

So anyway, for want of anything better to do I have been messing around with file permissions and sooner or later ended up with a file that had the following permissions:


I'll bet no one's seen that before. :-)
Is this just the dumbest thing ever, or is there a legitimate reason to have a file that can be written to by everyone but read by no one? Just curious....
Old 07-13-2009, 10:16 AM   #2
Registered: Aug 2002
Posts: 16,027

Rep: Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851Reputation: 1851
Not quite the same thing but Yes.....
Old 07-13-2009, 11:14 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Certainly not the only example of something on a computer being totally useless......

the good news: All combinations of permissions are available to you. You are in CONTROL!!
Old 07-13-2009, 11:23 AM   #4
Completely Clueless
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 816

Original Poster
Rep: Reputation: 69
Actually, it could be worse I guess:


Only Root can fix that. :-)

this might be a suitable directory to store the file in:

Old 07-13-2009, 12:48 PM   #5
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
A write-only file does actually have a use. It could be an output device file, which could be mapped to a kernel device driver for a piece of hardware that was only an output and provided no feedback.

In practice, all output devices in common use have some kind of feedback, and so most device files are read/write, but that isn't necessarily the case.

Of course, such a file would normally be b-w--w--w- or c-w--w--w- , but since the advent of procfs, it would be perfectly possible to create such a file under a virtual filesystem like /proc or /sys. On my system, for example, I have a file named /proc/sysrq-trigger with permissions of --w-------- (but none writeable by all users).
Old 07-13-2009, 01:14 PM   #6
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I just did a $ sudo ls -Rl /proc 2>/dev/null | grep \\\-w and saw a lot of links to pipes and some other files (like clear_refs) with only write access, although only the proc file owner could (as one would expect) write to the "file."


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
Useless divorce3 Fedora 4 07-10-2005 03:40 AM
probably useless Deno521 Linux - General 7 09-28-2004 07:20 PM
laptop screen totally useless shishimo Linux - Laptop and Netbook 1 06-21-2004 08:26 PM
Totally useless Linux tricks scott_R Linux - General 6 01-14-2004 01:16 AM
Huge problem: Slackware 8.1, the file 'crt1.o' is totally missing fern Linux - General 11 07-11-2002 12:15 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 PM.

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