LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

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:

--w--w--w-

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, 11:16 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,937

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Not quite the same thing but Yes.....
http://www.national.com/rap/Story/WOMorigin.html
http://en.wikipedia.org/wiki/Write-only_memory
 
Old 07-13-2009, 12:14 PM   #3
pixellany
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, 12:23 PM   #4
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 814

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:

d-w-------
 
Old 07-13-2009, 01:48 PM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 69
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, 02:14 PM   #6
PTrenholme
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."
 
  


Reply


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


All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration