|
|
A warning on a new destructive 'trojan horse'
Could you, for instance, create a file in the home directory that belongs to another user, so that the rm command would fail?
A warning on a new destructive 'trojan horse'
With rm -fr any files belonging to anyone would be deleted if they were in a directory to which you had read/write access. If you placed a directory inside of your home directory that had an owner other than yourself, and had a file inside of it that also was owned by someone other than yourself, then that directory and file would not be deleted by an rm -fr.
This would not, however, stop the destruction of everything else in your home directory. Every other file but that folder and its contents would still be deleted. rm doesn't just "delete only if everything listed can be deleted at once"...it "deletes everything it can that is listed". I'm afraid you'll have to keep searching if you want to find some protection. Or better yet, take a previous poster's advice and only double-click on applications you know and trust. When using your computer, being an untrusting cynic can be a good thing sometimes.
A warning on a new destructive 'trojan horse'
When you delete a file using 'rm', you are not directly deleting the file - you are only removing a hard link to the file from directory it's in. So, you don't need write access to a file to delete it - you just need write access to the directory where that hard link lives. When no more hard links exist for a file, then the kernel deletes it automatically. (That could probably be expressed more clearly...) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|