| 28 | | As far as networked filesystems go, Linux can support ACLs via Samba shares, |
|---|
| 29 | | but not with the current NFS implementation. NFSv3 simply doesn't have the |
|---|
| 30 | | necessary underlying mechanisms; such mechanisms are planned for the NFSv4 |
|---|
| 31 | | standard (which is in the works). This simply means that if you move files |
|---|
| 32 | | around on NFS shares, you can't depend on them to retain their ACL/EA metadata. |
|---|
| | 31 | As far as networked filesystems go, samba servers can support ACLs when |
|---|
| | 32 | working with Windows-based clients, but not Linux/UNIX-type clients. Cross- |
|---|
| | 33 | platform NFS support is even more tricky with ACLs. Patches to extend the |
|---|
| | 34 | current NFSv3 implementation are available from http://acl.bestbits.at/ ; |
|---|
| | 35 | however, they are not covered here, and the full extent of their ACL support |
|---|
| | 36 | is unknown. |
|---|
| 37 | | It should be noted that at the time of this writing, ACL support doesn't play |
|---|
| 38 | | nice with quota support in ext3. You will likely have frequent lockups if |
|---|
| 39 | | you try to use both at the same time. Also, ACL/EA support on the whole is |
|---|
| 40 | | very immature in Linux. You have been warned. |
|---|
| | 41 | It should be noted that some versions of ACL support don't play nice with |
|---|
| | 42 | quota support in ext3. You will likely have frequent lockups if you try to |
|---|
| | 43 | use both at the same time. |
|---|
| 42 | | It should also be noted that many shell scripts are liable to be broken by the |
|---|
| 43 | | updated fileutils. This is because "ls -l" will now mark each ACL-enabled |
|---|
| 44 | | entry with a "+" sign trailing after the traditional permissions bits. In |
|---|
| 45 | | short, instead of this: |
|---|
| | 45 | It should also be noted that if you're using fileutils instead of the newer |
|---|
| | 46 | coreutils, an ACL-enabled fileutils has a few quirks that break some shell |
|---|
| | 47 | scripts. This is because "ls -l" from an ACL-enabled fileutils will mark each |
|---|
| | 48 | ACL-enabled entry with a "+" sign trailing after the traditional permissions |
|---|
| | 49 | bits. In short, instead of this: |
|---|
| 69 | | http://acl.bestbits.at/current/diff/linux-2.4.18ea-0.8.26.diff.gz |
|---|
| 70 | | http://acl.bestbits.at/current/diff/linux-2.4.18acl-0.8.27.diff.gz |
|---|
| 71 | | |
|---|
| 72 | | If you plan to use ACLs with SGI XFS, you need some version of the Big XFS |
|---|
| 73 | | Kernel Patch(tm). I'm using the one from XFS release 1.1: |
|---|
| 74 | | |
|---|
| 75 | | ftp://oss.sgi.com/projects/xfs/download/Release-1.1/kernel-patches/ \ |
|---|
| 76 | | xfs-1.1-2.4.18-all.patch.bz2 |
|---|
| 77 | | # the URL is quite long, yes. |
|---|
| 78 | | |
|---|
| 79 | | You will also need userland libraries. Thanks to the recent ACL/EA syscall |
|---|
| 80 | | reservations, both XFS and ext2/3 ACLs are served by the same set of |
|---|
| 81 | | libraries: |
|---|
| 82 | | |
|---|
| 83 | | ftp://oss.sgi.com/projects/xfs/download/cmd_tars/attr-2.2.0.src.tar.gz |
|---|
| 84 | | ftp://oss.sgi.com/projects/xfs/download/cmd_tars/acl-2.2.4.src.tar.gz |
|---|
| 85 | | |
|---|
| 86 | | You should also compile a version of fileutils that works with ACLs, so that |
|---|
| 87 | | you don't lose ACL information with day-to-day file manipulation. You need |
|---|
| 88 | | the following packages for this: |
|---|
| 89 | | |
|---|
| 90 | | ftp://alpha.gnu.org/pub/gnu/fileutils/fileutils-4.1.8.tar.gz |
|---|
| 91 | | http://acl.bestbits.at/current/diff/fileutils-4.1.8acl-0.8.25.xdelta |
|---|
| 92 | | ftp://skarpsey.dyndns.org/fileutils-4.1.8acl-cpfix.patch.bz2 |
|---|
| 93 | | |
|---|
| 94 | | The xdelta file is the preferred method of patching ACL support into fileutils; |
|---|
| 95 | | the bzipped patch is a Kelledin(tm) special that fixes an ACL preservation bug. |
|---|
| 96 | | For the sake of convenience (especially for those who don't have XDelta), I've |
|---|
| 97 | | provided all the above fileutils stuff, rolled up into one nice little package: |
|---|
| 98 | | |
|---|
| 99 | | ftp://skarpsey.dyndns.org/fileutils-4.1.8acl-kelledin.tar.bz2 |
|---|
| | 71 | http://acl.bestbits.at/current/diff/ea+acl+nfsacl-2.4.21-0.8.60.diff.gz |
|---|
| 103 | | COMPILE: |
|---|
| | 76 | ftp://oss.sgi.com/projects/xfs/Release-1.3.1/kernel_patches/ \ |
|---|
| | 77 | linux-2.4.21-core-xfs-1.3.1.patch.gz |
|---|
| | 78 | ftp://oss.sgi.com/projects/xfs/Release-1.3.1/kernel_patches/ \ |
|---|
| | 79 | linux-xfs-1.3.1.patch.gz |
|---|
| | 80 | |
|---|
| | 81 | It should be noted that as of Dec 8 2003, SGI XFS is integrated with the |
|---|
| | 82 | vanilla Linux kernel. 2.4.24 should come with XFS support when it is released, |
|---|
| | 83 | so the above XFS patches will likely be unnecessary. |
|---|
| | 84 | |
|---|
| | 85 | You will also need userland libraries and utilities. Thanks to the recent |
|---|
| | 86 | ACL/EA syscall reservations, both XFS and ext2/3 ACLs are served by the same |
|---|
| | 87 | packages. However, the packages hosted at http://acl.bestbits.at are very |
|---|
| | 88 | outdated. It is recommended that you retrieve the packages from the SGI |
|---|
| | 89 | FTP server: |
|---|
| | 90 | |
|---|
| | 91 | ftp://oss.sgi.com/projects/xfs/cmd_tars/attr-2.4.12.src.tar.gz |
|---|
| | 92 | ftp://oss.sgi.com/projects/xfs/cmd_tars/acl-2.2.21.src.tar.gz |
|---|
| | 93 | |
|---|
| | 94 | |
|---|
| | 95 | You should also compile a version of coreutils that works with ACLs, so that |
|---|
| | 96 | you don't lose ACL information with day-to-day file manipulation. In addition |
|---|
| | 97 | to the coreutils source package, you need the coreutils patchset for this: |
|---|
| | 98 | |
|---|
| | 99 | http://acl.bestbits.at/current/diff/coreutils-5.0-0.tar.gz |
|---|
| | 100 | |
|---|
| | 101 | |
|---|
| | 102 | 4. Compile |
|---|
| 109 | | using "make menuconfig." Once you've got the kernel compiled and installed, |
|---|
| 110 | | it may be necessary to copy your new kernel headers to /usr/include/{linux,asm} |
|---|
| 111 | | all over again (I hear FHS zealots wailing already). Because of the known |
|---|
| 112 | | dangers of mismatching kernel headers and glibc headers, it's best to do the |
|---|
| 113 | | header copy at the beginning of Chapter 6 in the LFS book, BEFORE you compile |
|---|
| 114 | | glibc. Just substitute your ACL-patched kernel for the stock LFS kernel, and |
|---|
| 115 | | you should be fine. |
|---|
| | 108 | using "make menuconfig." For XFS, you may also need to enable certain |
|---|
| | 109 | suboptions of XFS support, found in the same menu screen. |
|---|
| 135 | | Now compile fileutils-4.1.8. I'm assuming you either knew how to do all the |
|---|
| 136 | | necessary patching, or you just got my pre-patched tarball: |
|---|
| | 140 | In order to enable ACLs on ext2/ext3, you will need to configure certain mount |
|---|
| | 141 | options. The "user_xattr" option enables user-accessible extended attributes; |
|---|
| | 142 | the "acl" option enables ACL support. You can either specify these options at |
|---|
| | 143 | every mount (possibly via /etc/fstab) or make these options enabled-by-default |
|---|
| | 144 | on a specific ext2/ext3 filesystem via tune2fs: |
|---|
| | 145 | |
|---|
| | 146 | tune2fs -o user_xattr /dev/<fs-device> |
|---|
| | 147 | tune2fs -o acl /dev/<fs-device> |
|---|
| | 148 | |
|---|
| | 149 | Now you need to patch coreutils. This is a bit complicated, as the coreutils |
|---|
| | 150 | patchset from acl.bestbits.at is a disorganized mess. I will assume you have |
|---|
| | 151 | untarred the patchset in /usr/src: |
|---|
| 139 | | ./configure --prefix=/usr --bindir=/bin && |
|---|
| 140 | | make && |
|---|
| 141 | | make install && |
|---|
| 142 | | ln -sf ../../bin/install /usr/bin |
|---|
| | 154 | patch -p1 < /usr/src/coreutils-5.0-0/coreutils-acl.diff && |
|---|
| | 155 | patch -p1 < /usr/src/coreutils-5.0-0/coreutils-acl+posix.diff && |
|---|
| | 156 | patch -p1 < /usr/src/coreutils-5.0-0/coreutils-xattr.diff && |
|---|
| | 157 | patch -p1 < /usr/src/coreutils-5.0-0/coreutils-i18n.patch && |
|---|
| | 158 | patch < /usr/src/coreutils-5.0-0/coreutils-5.0.dif && |
|---|
| | 159 | patch < /usr/src/coreutils-5.0-0/coreutils-tests.patch |
|---|
| | 162 | Now you should compile coreutils according to the instructions in your favorite |
|---|
| | 163 | version of the LFS book. |
|---|
| | 164 | |
|---|
| | 165 | At some point, you may wish to compile samba with ACL support. This is a |
|---|
| | 166 | simple matter of passing the "--with-acl-support" flag to samba's configure |
|---|
| | 167 | script. |
|---|
| | 168 | |
|---|
| | 169 | |
|---|
| | 170 | 5. Aftermath |
|---|
| | 171 | ------------------------------------------------------------------------------ |
|---|
| | 172 | You should now be able to view and modify ACLs on an ACL-ready filesystem, by |
|---|
| | 173 | way of the setfacl and getfacl utilities from the acl package. coreutils will |
|---|
| | 174 | not view or modify ACLs directly but will preserve them when moving, copying, |
|---|
| | 175 | or creating files. |
|---|
| | 176 | |
|---|
| | 177 | A properly compiled samba should be able to support ACLs over the network. |
|---|
| | 178 | While samba servers aren't in the habit of providing even complete UNIX-style |
|---|
| | 179 | permissions to UNIX/Linux clients, an ACL-enabled samba server is better |
|---|
| | 180 | equipped to support Windows clients. |
|---|
| | 181 | |
|---|
| | 182 | ------------------------------------------------------------------------------ |
|---|
| | 183 | |
|---|
| | 184 | CHANGELOG: |
|---|
| | 185 | [2003-12-08] |
|---|
| | 186 | * Updated with ext2/ext3 instructions (thanks to Daniel Thaler). |
|---|
| | 187 | * Updated to support new SysV-free XFS 1.3.1 release. |
|---|
| | 188 | * Updated to include newer versions of acl and attr. |
|---|
| | 189 | |
|---|
| | 190 | [2003-09-06] |
|---|
| | 191 | * Updated to support coreutils, linux-2.4.21, and recent new XFS 1.3 release. |
|---|
| | 192 | * Rewrote to accommodate new hints format. |
|---|