weird permitions

M.Hirsch M.Hirsch at hirsch.it
Wed Nov 29 11:52:44 PST 2006


> Hello,
>
> Can someone explain to me why next can happened on freebsd:
> 1. add 2 users in same group - user test and test-ro in group test
> 2. as user test: cd /home/test ; mkdir test; chmod 775 test; echo 
> "asdasd" > ~/test/del.me
> 3. su - test-ro ; cd /home/test; vim del.me - make changes; force save 
> (:x!)
>
> ls -l
> total 2
> -rw-r--r--  1 test-ro  test  10 Nov 29 18:19 del.me (how is that 
> possible ?)
>
> back "su - test" and try to edit this file - impossible!
>
> I do not know what the RFC says about it, but it is ultra weird for me
> that such ownership takeover is possible.
>
> 6.2-PRERELEASE FreeBSD Fri Oct 27 19:53:30 amd64
>

Correct me if I'm wrong... but you obviously were editing two completely 
distinct files.
~test/del.me (logged in as "test-ro")
and
~test/test/del.me (logged in as "test")

I fail to see anything odd here.
You seem to have enabled group writable home directories though.

M.


More information about the freebsd-stable mailing list