The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
df -k and deleting files ajayr111 UNIX for Dummies Questions & Answers 4 03-14-2007 05:03 PM
Deleting Files bc4 UNIX for Dummies Questions & Answers 1 01-25-2007 08:27 PM
Deleting files BG_JrAdmin SUN Solaris 1 11-28-2006 10:17 PM
Deleting old files shiroh_1982 Shell Programming and Scripting 2 06-21-2006 01:42 AM
Deleting the files livetaurean19 Shell Programming and Scripting 0 06-16-2005 01:16 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-04-2008
Registered User
 

Join Date: Dec 2007
Posts: 106
deleting another user's files

hi, I have two users, let us call them A and B.

I do as User A

touch tmpfile
chmod 700 tmpfile

Now as User B I do rm tmpfile - and it allows me to do it (after prompting me)...why?

If I had done chmod 777 tmpfile, then sure User B should be able to delete it, but I did chmod 700 tmpfile, so why was User B allowed to delete?

Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 07-04-2008
Registered User
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 183
Because whether or not you are allowed to delete a file depends on the rights (namely write) on the directory containing the file, not on the rights on the file itself. You can imagine a directory to be a file containing entries of the files in it.
Reply With Quote
  #3  
Old 07-05-2008
ffpradella's Avatar
Registered User
 

Join Date: Jun 2008
Location: Sao Paulo - Brazil
Posts: 36
Quote:
Originally Posted by fabtagon View Post
Because whether or not you are allowed to delete a file depends on the rights (namely write) on the directory containing the file, not on the rights on the file itself. You can imagine a directory to be a file containing entries of the files in it.
In this case, what is the purpose to give rights directly to a file?

Thanks.
Reply With Quote
  #4  
Old 07-05-2008
vbe vbe is online now
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 748
>In this case, what is the purpose to give rights directly to a file?

What is the "delete" right on a file?
...
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:17 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0