Bug 174949 - [zfs] ZFS ACL: rwxp required to mkdir. p should not be required.
Summary: [zfs] ZFS ACL: rwxp required to mkdir. p should not be required.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 1.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Edward Tomasz Napierala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 15:50 UTC by Sandra
Modified: 2013-04-01 14:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sandra 2013-01-03 15:50:02 UTC
ZFS ACL.

p is suppose to be permission to append to files, and also not being implemented.

For some reason p is required to mkdir.


This is the output from the script in "How to repeat the problem" which shows this bug.


p="/tank/project1"
d="$p/test3"
u="user1"

rm -rf $f $d $e $g
setfacl -b $p

setfacl -m group@::fd:allow $p || exit 1
setfacl -m everyone@::fd:allow $p || exit 1
setfacl -m owner@:rwx:fd:allow $p || exit 1
setfacl -m u:$u:rwx:fd:allow $p || exit 1
getfacl $p
# file: /tank/project1
# owner: root
# group: wheel
        user:user1:rwx-----------:fd----:allow
            owner@:rwx-----------:fd----:allow
            group@:--------------:fd----:allow
         everyone@:--------------:fd----:allow

su -m $u -c "mkdir $d"
mkdir: /tank/project1/test3: Permission denied

setfacl -m u:$u:rwxp:fd:allow $p || exit 1
su -m $u -c "mkdir $d"

getfacl $d
# file: /tank/project1/test3
# owner: user1
# group: wheel
        user:user1:rwxp----------:fd----:allow
            owner@:rwx-----------:fd----:allow
            group@:--------------:fd----:allow
         everyone@:--------------:fd----:allow

# all expect p
rm -rf $d

setfacl -m u:$u:rwxDdaARWcCos:fd:allow $p || exit 1
su -m $u -c "mkdir $d"
mkdir: /tank/project1/test3: Permission denied

getfacl $d
getfacl: /tank/project1/test3: stat() failed: No such file or directory

How-To-Repeat: p="/tank/project1"
d="$p/test3"
u="user1"

rm -rf $d
setfacl -b $p

setfacl -m group@::fd:allow $p || exit 1
setfacl -m everyone@::fd:allow $p || exit 1
setfacl -m owner@:rwx:fd:allow $p || exit 1
setfacl -m u:$u:rwx:fd:allow $p || exit 1
getfacl $p

su -m $u -c "mkdir $d"

setfacl -m u:$u:rwxp:fd:allow $p || exit 1
su -m $u -c "mkdir $d"

getfacl $d

# all expect p                                                                                            
rm -rf $d

setfacl -m u:$u:rwxDdaARWcCos:fd:allow $p || exit 1
su -m $u -c "mkdir $d"

getfacl $d
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-01-07 03:59:39 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Edward Tomasz Napierala freebsd_committer freebsd_triage 2013-01-15 16:57:16 UTC
Responsible Changed
From-To: freebsd-fs->trasz

I'll take it.
Comment 3 Edward Tomasz Napierala freebsd_committer freebsd_triage 2013-04-01 14:00:34 UTC
State Changed
From-To: open->closed

This is the valid behaviour - 'append_data', in SunOS also called 
'add_subdirectory', is what's required to create subdirectories. 
'write_file', aka 'add_file', permits creation of files.