LinuxQuestions.org
Visit Jeremy's Blog.
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-2008, 01:33 PM   #16
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61

Quote:
Originally Posted by shridhar005 View Post
1.Login as root
2.run following commands

3.This will surely help you .
Help who ?
 
Old 07-14-2008, 08:07 AM   #17
smoked kipper
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware,Slamd64
Posts: 81

Rep: Reputation: 15
Quote:
Originally Posted by Mr. C. View Post
Hmmm...

Code:
$ ls -ld .
drwxr-xr-x  17 mrc mrc 1536 Jul 13 01:10 ./
$ touch delete.me
$ sudo chown joe:joe delete.me
$ ls -l delete.me
-rw-r--r--  1 joe joe 0 Jul 13 01:10 delete.me
$ rm delete.me
override rw-r--r--  joe/joe for 'delete.me'? y
$ ls -l delete.me
ls: delete.me: No such file or directory
So what? No problem there.

File ownership/permissions determine whether you have permission to access/modify *the file*. rm'ing a "file" is NOT modifying the file, it is merely removing the directory entry (a name/inode pair as jschiwal mentioned). To rm a "file" (directory entry) you need write permission for the directory, the individual file owner/permissions are irrelevant (unless the sticky bit is set on the directory, in which case you must own the file).
 
Old 07-14-2008, 12:17 PM   #18
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Quote:
Originally Posted by smoked kipper View Post
So what? No problem there.

File ownership/permissions determine whether you have permission to access/modify *the file*. rm'ing a "file" is NOT modifying the file, it is merely removing the directory entry (a name/inode pair as jschiwal mentioned). To rm a "file" (directory entry) you need write permission for the directory, the individual file owner/permissions are irrelevant (unless the sticky bit is set on the directory, in which case you must own the file).
No problem. The example was my subtle way of calling out this very fact. It was a forced pause in the action, so to speak, to give the readers a chance to think, read the manuals, and work out the details.

You have it correct.

See my response #6 here: http://www.linuxquestions.org/questi...4/#post3203741

Last edited by Mr. C.; 07-14-2008 at 12:18 PM.
 
  


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
remove link kpachopoulos Linux - Newbie 2 07-23-2005 02:42 PM
Soft Link and Hard Link Moataz Red Hat 1 04-25-2005 06:30 AM
Is there a way to remove a symbolic link Philter Linux - Newbie 3 11-30-2004 06:24 PM
Can't remove symbolic link kimchee411 Linux - Newbie 1 10-06-2004 02:25 AM
how to remove link boToo Linux - Newbie 1 08-24-2003 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 PM.

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