Re: [SLUG] confused about file permissions

From: Eben King (eben1@tampabay.rr.com)
Date: Sat Oct 29 2005 - 00:38:34 EDT


On Fri, 28 Oct 2005, Sick Twist wrote:

> Having used Linux for some time, I thought I had a clear understanding of
> how file permissions work. However, I have no idea why I am able to delete a
> file owned by someone else for which I do not have write permission:

Whether you can delete a file depends on having write permission in its
directory, not on the permissions of the file itself. If you want to
truncate it and keep everything else -- inode, permissions, etc. -- the same
(e.g. "cat /dev/null > file"), you need to have write permission on the
file.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
VIRGO:  All Virgos are extremely friendly and intelligent - except
for you.  Expect a big surprise today when you wind up with your
head impaled upon a stick.  -- Weird Al, _Your Horoscope for Today_

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:55:08 EDT