Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2017 03:13:43 +0000
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
Message-ID:  <bug-216391-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216391-8>