On 19 Jul 16:23, Chris G wrote:
On Tue, Jul 19, 2011 at 04:11:47PM +0100, Brett Parker wrote:
On 19 Jul 15:37, Chris G wrote:
I.e. if I have a file I own that is read only I *can't* delete it if I am the user that owns the file, even using 'rm -f', however if I sudo to root privileges then 'rm -f' will remove the file even if there is no write permission.
Can you delete the single file? If not, then, erm, dya wanna check what the *directory* permissions are, because if the user hasn't got write to the directory, they can't delete things.
Also, please check which rm is being called in each case: as user: which rm as root: which rm
If the output of those don't match, that'll be the problem, probably.
(certainly I, as a normal user, can happily rm -rf my files and directories)
Finally, the thing that caused the problem, how do I guarantee that an 'rm -fr' run by a user will be able to delete everything in the specified directory tree? Do I have to do a 'chmod -R +w' first?
Can you quickly look at the output of "alias", I'd bet on there being a magic option set in there.
If you mean have I got rm aliased then no, I don't have it aliased.
Fair enough.