Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Repeated Questions?



On Aug 26,  9:44am, Mads Martin Joergensen wrote:
} Subject: Repeated Questions?
}
} When I try as a regular user to remove a directory owned by root I get
} the question twice:
} 
} 9:43 mmj@tiger:// > rm -r twoqestions 
} rm: remove write-protected directory `twoqestions'? y
} rm: remove write-protected directory `twoqestions'? y
} rm: cannot remove directory `twoqestions': Permission denied

These messages are coming from "rm", not from zsh.  The version of zsh
shouldn't have anything to do with it -- it must be the permissions on
the directory.

Here's what I get for a directory that is owned by root but readable by
anyone:

rm: directory `unremovable' is write protected; descend into it anyway? y
rm: remove directory `unremovable'? y
rm: cannot remove directory `unremovable': Operation not permitted

So the first question is rm asking whether to remove the contents of the
directory, and the second is asking whether to remove the directory itself.

Here's what I get if I "chmod -x" the directory:

rm: directory `unremovable' is write protected; descend into it anyway? y
rm: cannot change to directory unremovable: Permission denied

And if I "chmod +x,-r" the directory:

rm: directory `unremovable' is write protected; descend into it anyway? y
rm: unremovable/.: Permission denied
rm: remove directory `unremovable' (might be nonempty)? y
rm: cannot remove directory `unremovable': Operation not permitted

I think your version of "rm" is just not explaining itself well enough.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author