* File permissions in ext4
@ 2013-08-01 12:02 Felipe Monteiro de Carvalho
2013-08-01 12:34 ` Felipe Monteiro de Carvalho
0 siblings, 1 reply; 9+ messages in thread
From: Felipe Monteiro de Carvalho @ 2013-08-01 12:02 UTC (permalink / raw)
To: linux-ext4
Hello,
I am attempting to read the file permissions from a file in EXT4, but
I'm not sure where it is stored? Any ideas?
I thought this would be the ACL, and I read both
ext4_inode.i_file_acl_lo and ext4_inode.l_i_file_acl_high and they are
both zero, despite the fact that the file has 644 permission set. Is
the ACL actually used for anything?
thanks in advance =)
--
Felipe Monteiro de Carvalho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 12:02 File permissions in ext4 Felipe Monteiro de Carvalho
@ 2013-08-01 12:34 ` Felipe Monteiro de Carvalho
2013-08-01 12:59 ` Vyacheslav Dubeyko
2013-08-01 17:27 ` Eric Sandeen
0 siblings, 2 replies; 9+ messages in thread
From: Felipe Monteiro de Carvalho @ 2013-08-01 12:34 UTC (permalink / raw)
To: linux-ext4
Hello,
Ok, I found that the permissions that I was looking for are stored in
ext4_inode.i_mode ... but still there is the question: What is ACL
used for then, and when is it different than zero?
thanks =)
--
Felipe Monteiro de Carvalho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 12:34 ` Felipe Monteiro de Carvalho
@ 2013-08-01 12:59 ` Vyacheslav Dubeyko
2013-08-01 13:09 ` Felipe Monteiro de Carvalho
2013-08-01 17:27 ` Eric Sandeen
1 sibling, 1 reply; 9+ messages in thread
From: Vyacheslav Dubeyko @ 2013-08-01 12:59 UTC (permalink / raw)
To: Felipe Monteiro de Carvalho; +Cc: linux-ext4
On Thu, 2013-08-01 at 14:34 +0200, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> Ok, I found that the permissions that I was looking for are stored in
> ext4_inode.i_mode ... but still there is the question: What is ACL
> used for then, and when is it different than zero?
>
Do you build the kernel with POSIX ACLs support
(CONFIG_EXT4_FS_POSIX_ACL)?
With the best regards,
Vyacheslav Dubeyko.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 12:59 ` Vyacheslav Dubeyko
@ 2013-08-01 13:09 ` Felipe Monteiro de Carvalho
2013-08-01 13:19 ` Felipe Monteiro de Carvalho
2013-08-01 13:21 ` Vyacheslav Dubeyko
0 siblings, 2 replies; 9+ messages in thread
From: Felipe Monteiro de Carvalho @ 2013-08-01 13:09 UTC (permalink / raw)
To: slava; +Cc: linux-ext4
On Thu, Aug 1, 2013 at 2:59 PM, Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
> Do you build the kernel with POSIX ACLs support
> (CONFIG_EXT4_FS_POSIX_ACL)?
Anyway to find out this? I am using the pre-compiled kernel which
comes with Mageia Linux ... so I did not compile the kernel myself.
--
Felipe Monteiro de Carvalho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 13:09 ` Felipe Monteiro de Carvalho
@ 2013-08-01 13:19 ` Felipe Monteiro de Carvalho
2013-08-01 13:21 ` Vyacheslav Dubeyko
1 sibling, 0 replies; 9+ messages in thread
From: Felipe Monteiro de Carvalho @ 2013-08-01 13:19 UTC (permalink / raw)
To: slava; +Cc: linux-ext4
On Thu, Aug 1, 2013 at 3:09 PM, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho@gmail.com> wrote:
> On Thu, Aug 1, 2013 at 2:59 PM, Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
>> Do you build the kernel with POSIX ACLs support
>> (CONFIG_EXT4_FS_POSIX_ACL)?
>
> Anyway to find out this? I am using the pre-compiled kernel which
> comes with Mageia Linux ... so I did not compile the kernel myself.
But anyway, I have my own code for reading the file system which I am
running in Mac OS X/Linux/Windows ... so I wonder what difference it
would make the kernel... maybe it is about the kernel at the time when
the partition was created?
--
Felipe Monteiro de Carvalho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 13:09 ` Felipe Monteiro de Carvalho
2013-08-01 13:19 ` Felipe Monteiro de Carvalho
@ 2013-08-01 13:21 ` Vyacheslav Dubeyko
2013-08-01 13:23 ` Felipe Monteiro de Carvalho
1 sibling, 1 reply; 9+ messages in thread
From: Vyacheslav Dubeyko @ 2013-08-01 13:21 UTC (permalink / raw)
To: Felipe Monteiro de Carvalho; +Cc: linux-ext4
On Thu, 2013-08-01 at 15:09 +0200, Felipe Monteiro de Carvalho wrote:
> On Thu, Aug 1, 2013 at 2:59 PM, Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
> > Do you build the kernel with POSIX ACLs support
> > (CONFIG_EXT4_FS_POSIX_ACL)?
>
> Anyway to find out this? I am using the pre-compiled kernel which
> comes with Mageia Linux ... so I did not compile the kernel myself.
>
You can check it in your kernel configuration file. Ubuntu stores such
files in /boot/config-<kernel-version>.
Anyway, I think that this quotation from fs/ext4/Kconfig can be helpful
for you:
config EXT4_FS_POSIX_ACL
bool "Ext4 POSIX Access Control Lists"
depends on EXT4_FS
select FS_POSIX_ACL
help
POSIX Access Control Lists (ACLs) support permissions for users and
groups beyond the owner/group/world scheme.
To learn more about Access Control Lists, visit the POSIX ACLs for
Linux website <http://acl.bestbits.at/>.
If you don't know what Access Control Lists are, say N
With the best regards,
Vyacheslav Dubeyko.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 13:21 ` Vyacheslav Dubeyko
@ 2013-08-01 13:23 ` Felipe Monteiro de Carvalho
2013-08-01 13:35 ` Vyacheslav Dubeyko
0 siblings, 1 reply; 9+ messages in thread
From: Felipe Monteiro de Carvalho @ 2013-08-01 13:23 UTC (permalink / raw)
To: slava; +Cc: linux-ext4
On Thu, Aug 1, 2013 at 3:21 PM, Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
> config EXT4_FS_POSIX_ACL
> POSIX Access Control Lists (ACLs) support permissions for users and
> groups beyond the owner/group/world scheme.
>
> To learn more about Access Control Lists, visit the POSIX ACLs for
> Linux website <http://acl.bestbits.at/>.
Aha, so it is just a more advanced version of the permissions. But I
suppose that i_mode will always be valid even if the file system also
support ACL, correct?
--
Felipe Monteiro de Carvalho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 13:23 ` Felipe Monteiro de Carvalho
@ 2013-08-01 13:35 ` Vyacheslav Dubeyko
0 siblings, 0 replies; 9+ messages in thread
From: Vyacheslav Dubeyko @ 2013-08-01 13:35 UTC (permalink / raw)
To: Felipe Monteiro de Carvalho; +Cc: linux-ext4
On Thu, 2013-08-01 at 15:23 +0200, Felipe Monteiro de Carvalho wrote:
> On Thu, Aug 1, 2013 at 3:21 PM, Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
> > config EXT4_FS_POSIX_ACL
> > POSIX Access Control Lists (ACLs) support permissions for users and
> > groups beyond the owner/group/world scheme.
> >
> > To learn more about Access Control Lists, visit the POSIX ACLs for
> > Linux website <http://acl.bestbits.at/>.
>
> Aha, so it is just a more advanced version of the permissions. But I
> suppose that i_mode will always be valid even if the file system also
> support ACL, correct?
>
As I understand, yes. Because ACLs are simply enhancement of permission
model.
With the best regards,
Vyacheslav Dubeyko.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: File permissions in ext4
2013-08-01 12:34 ` Felipe Monteiro de Carvalho
2013-08-01 12:59 ` Vyacheslav Dubeyko
@ 2013-08-01 17:27 ` Eric Sandeen
1 sibling, 0 replies; 9+ messages in thread
From: Eric Sandeen @ 2013-08-01 17:27 UTC (permalink / raw)
To: Felipe Monteiro de Carvalho; +Cc: linux-ext4
On 8/1/13 7:34 AM, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> Ok, I found that the permissions that I was looking for are stored in
> ext4_inode.i_mode ... but still there is the question: What is ACL
> used for then, and when is it different than zero?
>
> thanks =)
>
It is the block number containing an extended attribute for that inode,
if any; that extended attribute may be a file ACL.
It's a bit odd to call the xattr block "ACL" but it is what it is. ;)
-Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-08-01 17:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 12:02 File permissions in ext4 Felipe Monteiro de Carvalho
2013-08-01 12:34 ` Felipe Monteiro de Carvalho
2013-08-01 12:59 ` Vyacheslav Dubeyko
2013-08-01 13:09 ` Felipe Monteiro de Carvalho
2013-08-01 13:19 ` Felipe Monteiro de Carvalho
2013-08-01 13:21 ` Vyacheslav Dubeyko
2013-08-01 13:23 ` Felipe Monteiro de Carvalho
2013-08-01 13:35 ` Vyacheslav Dubeyko
2013-08-01 17:27 ` Eric Sandeen
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).