[Almost solved] Cannot enable ACLs

Heinrich Rebehn rebehn at ant.uni-bremen.de
Mon May 30 10:00:00 PDT 2005


Heinrich Rebehn wrote:
> Hi list,
> 
> I have no luck trying to enable ACLs on my UFS2 filesystem:
> 
> #################################################
> 
> root at antsrv1 [~] # mount -u -o ro /export/linux/root
> root at antsrv1 [~] # mount|grep linux/root
> /dev/da0s1a on /export/linux/root (ufs, NFS exported, local, read-only, 
> soft-updates)
> 
> root at antsrv1 [~] # tunefs -a enable /export/linux/root
> tunefs: ACLs set
> root at antsrv1 [~] # tunefs -p /export/linux/root
> tunefs: ACLs: (-a)                                         enabled
> tunefs: MAC multilabel: (-l)                               disabled
> tunefs: soft updates: (-n)                                 enabled
> tunefs: maximum blocks per file in a cylinder group: (-e)  2048
> tunefs: average file size: (-f)                            16384
> tunefs: average number of files in a directory: (-s)       64
> tunefs: minimum percentage of free space: (-m)             8%
> tunefs: optimization preference: (-o)                      time
> tunefs: volume label: (-L)
> 
> root at antsrv1 [~] # mount -u -o rw /export/linux/root
> root at antsrv1 [~] # mount|grep linux/root
> /dev/da0s1a on /export/linux/root (ufs, NFS exported, local, soft-updates)
> root at antsrv1 [~] # tunefs -p /export/linux/root
> tunefs: ACLs: (-a)                                         disabled
> tunefs: MAC multilabel: (-l)                               disabled
> tunefs: soft updates: (-n)                                 enabled
> tunefs: maximum blocks per file in a cylinder group: (-e)  2048
> tunefs: average file size: (-f)                            16384
> tunefs: average number of files in a directory: (-s)       64
> tunefs: minimum percentage of free space: (-m)             8%
> tunefs: optimization preference: (-o)                      time
> tunefs: volume label: (-L)
> 
> root at antsrv1 [~] # mount|grep linux/root
> /dev/da0s1a on /export/linux/root (ufs, NFS exported, local, soft-updates)
> root at antsrv1 [~] #
> 
> ##################################################################
> 
> As you can see, if i mount the fs r/o, i can enable ACLs, but as soon as 
> i remount r/w again, ACLs are disabled again.
> According to the handbook, this should work.
> What am i missing?
> 
> root at antsrv1 [~] # uname -a
> FreeBSD antsrv1.ant.uni-bremen.de 5.3-RELEASE-p15 FreeBSD 
> 5.3-RELEASE-p15 #13: Fri May 13 09:35:22 CEST 2005 
> root at antsrv1.ant.uni-bremen.de:/usr/obj/usr/src/sys/ANTSRV1  i386
> 
I found out what i was missing:
kernel: WARNING: /export/linux/root was not properly dismounted

After doing an fsck which found and corrected some errors, i tried again.
Now tunefs reports:
root at antsrv1 [~] # tunefs -p /export/linux/root
tunefs: ACLs: (-a)                                         disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 enabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)

Yet mount says:
 
               root at antsrv1 [~] # mount|grep linux/root
/dev/da0s1a on /export/linux/root (ufs, NFS exported, local, 
soft-updates, acls)

And ACLs *do* work:

root at antsrv1 [/export/linux/root/debian/usr/local/share] # ls -ld wallpaper/
drwxrwxr-x+ 2 root  wheel  512 May 30 16:05 wallpaper/
root at antsrv1 [/export/linux/root/debian/usr/local/share] # getfacl wallpaper
#file:wallpaper
#owner:0
#group:0
user::rwx
user:rebehn:rwx
group::r-x
mask::rwx
other::r-x

User rebehn is able to write to the directory "wallpaper".

Strange, that tunefs still reports that acls are disabled.


--Heinrich



More information about the freebsd-questions mailing list