All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Eric Sandeen <sandeen@redhat.com>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: enable acls and user_xattr by default
Date: Thu, 24 Feb 2011 11:49:13 -0500	[thread overview]
Message-ID: <20110224164913.GT2924@thunk.org> (raw)
In-Reply-To: <20110224135740.GF23042@quack.suse.cz>

On Thu, Feb 24, 2011 at 02:57:40PM +0100, Jan Kara wrote:
>   I've actually tried that before posting my email and it's not like that.
> I did:
> jack@quack:~/source> echo 'aaa' >/tmp/f
> jack@quack:~/source> chmod 600 /tmp/f
> jack@quack:~/source> setfacl -m u:nobody:rw /tmp/f
> jack@quack:~/source> sudo su nobody -c "cat /tmp/f"
> aaa
> jack@quack:~/source> sudo su news -c "cat /tmp/f"
> cat: /tmp/f: Permission denied

Hmm... yes, but it's a bit more complicated.  Look at this, and note
how remounting the file system without acl's gave the group "users" rw
access to the file /mnt/f.

						- Ted

<tytso.root@tytso-glaptop> {/}  
2100# mount -o acl /dev/funarg/test /mnt
<tytso.root@tytso-glaptop> {/}  
2101# echo aaa > /mnt/f
<tytso.root@tytso-glaptop> {/}  
2102# chown root:users /mnt/f
<tytso.root@tytso-glaptop> {/}  
2103# chmod 400 /mnt/f
<tytso.root@tytso-glaptop> {/}  
2104# ls -l /mnt/f
4 -r-------- 1 root users 4 Feb 24 11:46 /mnt/f
<tytso.root@tytso-glaptop> {/}  
2105# setfacl -m u:tytso:rw /mnt/f
<tytso.root@tytso-glaptop> {/}  
2106# getfacl /mnt/f
getfacl: Removing leading '/' from absolute path names
# file: mnt/f
# owner: root
# group: users
user::r--
user:tytso:rw-
group::---
mask::rw-
other::---

<tytso.root@tytso-glaptop> {/}  
2107# ls -l /mnt/f
8 -r--rw----+ 1 root users 4 Feb 24 11:46 /mnt/f
<tytso.root@tytso-glaptop> {/}  
2108# umount /mnt
<tytso.root@tytso-glaptop> {/}  
2109# mount -o noacl /dev/funarg/test /mnt
<tytso.root@tytso-glaptop> {/}  
2110# ls -l /mnt/f
8 -r--rw---- 1 root users 4 Feb 24 11:46 /mnt/f




  reply	other threads:[~2011-02-24 16:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 20:31 [PATCH] ext4: enable acls and user_xattr by default Eric Sandeen
2011-02-21 13:46 ` Jan Kara
2011-02-21 17:10   ` Eric Sandeen
2011-02-23 17:31     ` Ted Ts'o
2011-02-24 11:49       ` Jan Kara
2011-02-24 12:19         ` Theodore Tso
2011-02-24 13:57           ` Jan Kara
2011-02-24 16:49             ` Ted Ts'o [this message]
2011-02-24 18:31               ` Jan Kara
2011-02-23 22:51 ` Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110224164913.GT2924@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.