deleting a file

bill purvis bil at beeb.net
Wed Jan 9 19:51:07 UTC 2008


On Wednesday 09 January 2008, Chris Jones wrote:
> > There is something else going on here as permissions are ignored when
> > root accesses files. I'm not sure what though, perhaps the file is in
> > use by something?
>
> Quite right. Should have engaged brain better before my last reply...
>
> What does for instance
>
>   > sudo ls -l thisfile.a
>
> and
>
>   > sudo lsof thisfile.a
>
> give ??
>
> cheers Chris
This can't be the explanation - root can delete the file even if it's in
use by a process. All it does is remove the link in the directory. The
file remains in existence until it gets closed then close will discard
it. Why not just change the permissions back to 644 (or 755?).

Bill
-- 
+---------------------------------------+
| Bill Purvis, Amateur Mathematician    |
|  email: bil at beeb.net                  |
|  http://bil.members.beeb.net          |
+---------------------------------------+




More information about the ubuntu-users mailing list