From owner-freebsd-bugs@freebsd.org Mon Jan 23 03:13:44 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 126D6CBC99D for ; Mon, 23 Jan 2017 03:13:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDB7A7EB for ; Mon, 23 Jan 2017 03:13:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0N3DhhK073637 for ; Mon, 23 Jan 2017 03:13:43 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 216391] [fusefs] fs mounted with option default_permission + allow_other not doing permission check as expected Date: Mon, 23 Jan 2017 03:13:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: hiyorin@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 03:13:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216391 Bug ID: 216391 Summary: [fusefs] fs mounted with option default_permission + allow_other not doing permission check as expected Product: Base System Version: 11.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: hiyorin@gmail.com ## Environment # uname -a FreeBSD bsd_test 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Se= p 29 01:43:23 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 Tested on both real hardware and a VirtualBox VM. The VM is a fresh install= of default FreeBSD 11. ## Description According to manual of mount.fuse, mounted filesystem with option "default_permission" should let the OS to do file permission checking using= the file mode and "allow_other" should allow access of mounted data by other us= er. However it seems the permission check is not working as expected on FreeBSD= . I have tried to reproduce it on CentOS7 and it works as expected.=20 Note: unionfs is used in How-To-Repeat section as an example only. I also t= ried encfs and it has the same problem too. Since both of unionfs and encfs seems not implemented any of permission check by itself. I believe it is the prob= lem in the fuse implementation of FreeBSD. ## How-To-Repeat =3D> as root user # cd /_test # mkdir a # mkdir b # echo "1" > a/1 # echo "2" > a/2 # chmod 600 a/1 # mkdir u # unionfs -o default_permissions,allow_other a=3DRW:b=3DRO u # ll u total 8 -rw------- 1 root wheel 2 Jan 18 21:23 1 -rw-r--r-- 1 root wheel 2 Jan 18 21:23 2 # cat a/1 1 # Problem =3D> as normal user % cd /_test % cat a/1 cat: a/1: Permission denied % cat u/1 1 # Expected =3D> as normal user % cd /_test % cat a/1 cat: a/1: Permission denied % cat u/1 cat: u/1: Permission denied --=20 You are receiving this mail because: You are the assignee for the bug.=