jail file and directory permissions

Ian Smith smithi at nimnet.asn.au
Mon Apr 12 13:12:34 UTC 2010


On Mon, 12 Apr 2010, Erich Jenkins, Fuujin Group Ltd wrote:
 > Kalle Møller wrote:
 > <snip>
 > > Could you please make a command list on what your doing and with output..
 > > like this ...
 > > 
 > > -- 
 > > 
 > > Med Venlig Hilsen
 > > 
 > > Kalle R. Møller
 > </snip>
 > 
 > Here's what I'm seeing:
 > 
 > jail0495> pwd
 > /usr/home/testuser
 > jail0495> ll
 > -rw-------   1 testuser rmtuser   1957 Apr 12 02:22 .history
 > drwxr--r--   2 root     wheel     1024 Apr 12 02:22 testdir
 > jail0495> users
 > testuser

users just shows the login user, even if you've su'd to root.  Can you 
show `id -p` at this point?

 > jail0495> cd testdir

testuser shouldn't be able to cd to that dir, nor browse it, let alone 
delete a file in it.  sure smells like your effective uid here is root.

 > jail0495> ll
 > -rw-r--r--   2 root     wheel     4096 Apr 12 02:24 textfile.txt
 > jail0495> rm textfile.txt
 > override rw-r--r--  root/wheel for textfile.txt ? y
 > jail0495> ll
 > total 0
 > jail0495>
 > 
 > As you can see, this is of great concern.

Indeed.

cheers, Ian


More information about the freebsd-bugs mailing list