linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ACL rules doesn't propagate on btrfs
@ 2013-10-15 15:56 Giuseppe Fierro
  2013-10-15 17:28 ` Filipe David Manana
  0 siblings, 1 reply; 2+ messages in thread
From: Giuseppe Fierro @ 2013-10-15 15:56 UTC (permalink / raw)
  To: linux-btrfs

I'm playing with acl permission on btrfs (my favourite filesytem).
When I set ACL permission on directory happens that this permission doesn't
propagate inside the directory structure.

As you can see from the following example after the second level the ACL's
rules are completely forgotten.


gspe@Jura:~/Videos$ sudo mkdir test_prj
> [sudo] password for gspe:
> gspe@Jura:~/Videos$ ls -l
> total 0
> drwxr-xr-x 1 root root 0 ott 15 17:48 test_prj
> gspe@Jura:~/Videos$ sudo chown root:gmingegneria test_prj
> gspe@Jura:~/Videos$ ls -l
> total 0
> drwxr-xr-x 1 root gmingegneria 0 ott 15 17:48 test_prj
> gspe@Jura:~/Videos$ sudo chmod o-rwx test_prj
> gspe@Jura:~/Videos$ sudo chmod g+rwx test_prj
> gspe@Jura:~/Videos$ ls -l
> total 0
> drwxrwx--- 1 root gmingegneria 0 ott 15 17:48 test_prj
> gspe@Jura:~/Videos$ sudo chmod g+s test_prj
> gspe@Jura:~/Videos$ ls -l
> total 0
> drwxrws--- 1 root gmingegneria 0 ott 15 17:48 test_prj
> gspe@Jura:~/Videos$ sudo setfacl -d --set u::rwx,g::rwx,o::- test_prj
> gspe@Jura:~/Videos$ ls -l
> total 0
> drwxrws---+ 1 root gmingegneria 0 ott 15 17:48 test_prj
> gspe@Jura:~/Videos$ getfacl test_prj
> # file: test_prj
> # owner: root
> # group: gmingegneria
> # flags: -s-
> user::rwx
> group::rwx
> other::---
> default:user::rwx
> default:group::rwx
> default:other::---
> gspe@Jura:~/Videos$ cd test_prj
> gspe@Jura:~/Videos/test_prj$ touch file01
> gspe@Jura:~/Videos/test_prj$ mkdir test01
> gspe@Jura:~/Videos/test_prj$ ls -l
> total 0
> -rw-rw---- 1 gspe gmingegneria 0 ott 15 17:51 file01
> drwxrws--- 1 gspe gmingegneria 0 ott 15 17:51 test01
> gspe@Jura:~/Videos/test_prj$ getfacl file01
> # file: file01
> # owner: gspe
> # group: gmingegneria
> user::rw-
> group::rw-
> other::---
> gspe@Jura:~/Videos/test_prj$ getfacl test01
> # file: test01
> # owner: gspe
> # group: gmingegneria
> # flags: -s-
> user::rwx
> group::rwx
> other::---
> gspe@Jura:~/Videos/test_prj$ cd test01

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ACL rules doesn't propagate on btrfs
  2013-10-15 15:56 ACL rules doesn't propagate on btrfs Giuseppe Fierro
@ 2013-10-15 17:28 ` Filipe David Manana
  0 siblings, 0 replies; 2+ messages in thread
From: Filipe David Manana @ 2013-10-15 17:28 UTC (permalink / raw)
  To: Giuseppe Fierro; +Cc: linux-btrfs@vger.kernel.org

On Tue, Oct 15, 2013 at 4:56 PM, Giuseppe Fierro <giuseppe@fierro.org> wrote:
> I'm playing with acl permission on btrfs (my favourite filesytem).
> When I set ACL permission on directory happens that this permission doesn't
> propagate inside the directory structure.
>
> As you can see from the following example after the second level the ACL's
> rules are completely forgotten.
>
>
> gspe@Jura:~/Videos$ sudo mkdir test_prj
>> [sudo] password for gspe:
>> gspe@Jura:~/Videos$ ls -l
>> total 0
>> drwxr-xr-x 1 root root 0 ott 15 17:48 test_prj
>> gspe@Jura:~/Videos$ sudo chown root:gmingegneria test_prj
>> gspe@Jura:~/Videos$ ls -l
>> total 0
>> drwxr-xr-x 1 root gmingegneria 0 ott 15 17:48 test_prj
>> gspe@Jura:~/Videos$ sudo chmod o-rwx test_prj
>> gspe@Jura:~/Videos$ sudo chmod g+rwx test_prj
>> gspe@Jura:~/Videos$ ls -l
>> total 0
>> drwxrwx--- 1 root gmingegneria 0 ott 15 17:48 test_prj
>> gspe@Jura:~/Videos$ sudo chmod g+s test_prj
>> gspe@Jura:~/Videos$ ls -l
>> total 0
>> drwxrws--- 1 root gmingegneria 0 ott 15 17:48 test_prj
>> gspe@Jura:~/Videos$ sudo setfacl -d --set u::rwx,g::rwx,o::- test_prj
>> gspe@Jura:~/Videos$ ls -l
>> total 0
>> drwxrws---+ 1 root gmingegneria 0 ott 15 17:48 test_prj
>> gspe@Jura:~/Videos$ getfacl test_prj
>> # file: test_prj
>> # owner: root
>> # group: gmingegneria
>> # flags: -s-
>> user::rwx
>> group::rwx
>> other::---
>> default:user::rwx
>> default:group::rwx
>> default:other::---
>> gspe@Jura:~/Videos$ cd test_prj
>> gspe@Jura:~/Videos/test_prj$ touch file01
>> gspe@Jura:~/Videos/test_prj$ mkdir test01
>> gspe@Jura:~/Videos/test_prj$ ls -l
>> total 0
>> -rw-rw---- 1 gspe gmingegneria 0 ott 15 17:51 file01
>> drwxrws--- 1 gspe gmingegneria 0 ott 15 17:51 test01
>> gspe@Jura:~/Videos/test_prj$ getfacl file01
>> # file: file01
>> # owner: gspe
>> # group: gmingegneria
>> user::rw-
>> group::rw-
>> other::---
>> gspe@Jura:~/Videos/test_prj$ getfacl test01
>> # file: test01
>> # owner: gspe
>> # group: gmingegneria
>> # flags: -s-
>> user::rwx
>> group::rwx
>> other::---
>> gspe@Jura:~/Videos/test_prj$ cd test01

Confirmed here with btrfs-next and found out why it happens. If you
unmount and mount again the fs, getfacl returns the expected output.
Sending a patch soon.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-15 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 15:56 ACL rules doesn't propagate on btrfs Giuseppe Fierro
2013-10-15 17:28 ` Filipe David Manana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).