[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Gain owner of a file using vim :w!



Joe Riel writes:
> You have write permission to the directory, so you can delete the file
> and create a new one, with yourself as the owner.  That is,
> essentially, what vi is doing.

Note that if the file had had a hardlink in another directory, say one
owned by root, that link (and therefor the actual file) would not have
been deleted.  The effect would have been to replace the link in his
directory with a copy owned by him, leaving the original file and the
other link unchanged.
-- 
John Hasler


Reply to: