LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-02-2007, 12:21 PM   #1
armandino
Member
 
Registered: Oct 2005
Posts: 72

Rep: Reputation: 15
Where are ACL permissions saved?


I learned that, provided I have the right packages and kernel modules (which are already there, for example, in Fedora), I can mount an ext2/3 fs with the "acl" option and then use the getfacl/setfacl command to set permissions on a user/group basis.

Where are those informations saved?
I suppose in the mounted file system, as they should "stay" with the files and folders they are referring to. However, they can NOT be in the inodes, which are already... full with standard Unix permissions.

Moreover, are they lost in case, after setting them, I should mount the same fs WITHOUT the "acl" option? Or do they stay there (where?), with no effect, until the fs gets "acl" mounted again?

Thanks
 
Old 07-03-2007, 11:18 AM   #2
unixpgmr
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Rep: Reputation: 0
I can't speak specifically to linux and ext3, but usually they are stored in the first inode that the file resides on. Consequently, they should still be there if you mount without ACL option. However, if you use a kernel that does not support extended attributes and write to the files system, you could have issues. A warning about ACLs: The acl can go away in certain circumstances. For example, if you set a read-only acl on one of your log files. Don't expect the acl to be there after a log rotate. When that file is deleted, the acl goes away - even if you create a new file with the same name. New file=new inode. Hope this helps.
Quote:
Originally Posted by armandino
I learned that, provided I have the right packages and kernel modules (which are already there, for example, in Fedora), I can mount an ext2/3 fs with the "acl" option and then use the getfacl/setfacl command to set permissions on a user/group basis.

Where are those informations saved?
I suppose in the mounted file system, as they should "stay" with the files and folders they are referring to. However, they can NOT be in the inodes, which are already... full with standard Unix permissions.

Moreover, are they lost in case, after setting them, I should mount the same fs WITHOUT the "acl" option? Or do they stay there (where?), with no effect, until the fs gets "acl" mounted again?

Thanks
 
Old 07-04-2007, 03:03 AM   #3
armandino
Member
 
Registered: Oct 2005
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unixpgmr
I can't speak specifically to linux and ext3, but usually they are stored in the first inode that the file resides on...
Thanks a lot.

What happens then when you enable acl (by remounting with the acl option) on an existent ext3 filesystem and apply acl rules to files which had been saved before?

Aren't the first inodes already full of data?
Are the data moved from the first inode (to where?) to make space for acl stuff?
 
Old 07-04-2007, 11:39 PM   #4
unixpgmr
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Rep: Reputation: 0
Usually, filesystems that have the ability to use acls, generally have space available for acls whether you have them enabled or not. Consequently, if you don't use them, it is space not used within the inode (part of the data structure that makes up the inode). Take a look here: http://www.suse.de/~agruen/acl/linux-acls/online/ Scroll down to the ext2/ext3 section. It should give you some good information. I know that the article is somewhat dated, but it does give some good basic information. I should say that I am not a filesystem developer. My experience with ACLs and Mandatory Access Controls are with a different operating system. So specific implementation issues may be different. I hope that this helps.
Quote:
Originally Posted by armandino
Thanks a lot.

What happens then when you enable acl (by remounting with the acl option) on an existent ext3 filesystem and apply acl rules to files which had been saved before?

Aren't the first inodes already full of data?
Are the data moved from the first inode (to where?) to make space for acl stuff?
 
Old 07-05-2007, 01:44 AM   #5
armandino
Member
 
Registered: Oct 2005
Posts: 72

Original Poster
Rep: Reputation: 15
It surely helps, a lot.
Thank you very much.
 
Old 07-05-2007, 11:56 AM   #6
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
Quote:
Originally Posted by armandino
What happens then when you enable acl (by remounting with the acl option) on an existent ext3 filesystem and apply acl rules to files which had been saved before?
What Fedora has are extended file attributes for ext3 (and xfs, I suppose) filesystems. This seems similar to acls, but I don't know the relationship between the two. Attrs are used for Secure Linux. To answer the question you asked about acls for attrs, when you enable SELinux, on the next reboot, file attributes are set according to whatever policies are in effect (takes awhile). These extended file attributes do not need to be enabled with a special mounting option in Fedora 6 -- they're the default. You see them with "ls -Z".
 
Old 07-05-2007, 11:46 PM   #7
unixpgmr
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Rep: Reputation: 0
Actually, when you use ls -Z you see something quite different than ACLs - you see something called type enforcement. It is similar to MAC (Mandatory Access Control) labels. The relationship of extended attributes and acls is that both are stored in the inodes and both are used to enhance security on various operating systems. Extended Attributes are not specifically for securing linux, but are a tool to that end. Having extended attributes doesn't secure a linux system. The application of extended attributes can help secure a linux system. Yes xfs has extended attributes as well as ACLs.
Quote:
Originally Posted by GregLee
What Fedora has are extended file attributes for ext3 (and xfs, I suppose) filesystems. This seems similar to acls, but I don't know the relationship between the two. Attrs are used for Secure Linux. To answer the question you asked about acls for attrs, when you enable SELinux, on the next reboot, file attributes are set according to whatever policies are in effect (takes awhile). These extended file attributes do not need to be enabled with a special mounting option in Fedora 6 -- they're the default. You see them with "ls -Z".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default ACL and permissions inheritance mikemrh9 Linux - Security 5 07-05-2016 06:19 AM
acl sheetu Solaris / OpenSolaris 1 09-10-2006 12:48 PM
acl permissions linuxtesting2 Linux - General 0 10-25-2004 02:18 PM
default files and folder acl permissions Baltasar Fedora 4 08-30-2004 12:50 PM
ACL Help theDrix Linux - General 0 07-22-2004 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration