Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!bzs%bostonu.csnet@csnet-relay.arpa From: bzs%bostonu.csnet@csnet-relay.arpa (Barry Shein) Newsgroups: net.unix-wizards Subject: 4.2bsd Oddity (BUG?) Message-ID: <721@brl-tgr.ARPA> Date: Mon, 16-Dec-85 09:56:15 EST Article-I.D.: brl-tgr.721 Posted: Mon Dec 16 09:56:15 1985 Date-Received: Wed, 18-Dec-85 02:17:30 EST Sender: news@brl-tgr.ARPA Lines: 39 Here's one a faculty member pointed out, I suspect it was in relation to one of his courses: He makes a directory, call it 'gumby' and makes it 777 (world write is what's important here.) Someone else comes along and creates a directory 'gumby/pokey' (say protection 755) and puts a file (or more) into it, call it gumby/pokey/foo. At that point he can no longer remove the directory gumby because it is not empty. 'rm -r' et al don't help because the directory gumby/pokey is owned by the other user and does not allow him to delete the file gumby/pokey/foo, nor chmod it. I think he is stuck (obviously the student or myself can remove it.) If I recall correctly, what he does is create a subdir for his students. His students then create a subdir for themselves and put homeworks into it, so the way he got there is fairly reasonable (it is a high level, small course so security is not a big issue here I suspect, no need to belabor that.) Other than the obvious 'don't do it that way' am I missing something? Is this a bug? Anyone want to suggest a fix? -Barry Shein, Boston University P.S. If you think it's incredibly obvious you may have missed the point, try the following first from root: mkdir gumby chown yournonprivacct gumby chmod 777 gumby mkdir gumby/pokey chmod 755 gumby/pokey echo hello > gumby/pokey/foo Now make yourself non-prived (I just 'suspend' the 'su'd csh back to bzs) and try to remove everything. pokey and foo should be owned by root (or some other account.)