- 论坛徽章:
- 0
|
首先,谢谢楼上的回复。
可惜,好像不对。
还是自己来解决!终于找到答案了:
You simply need to decide on which filesystem(s) you wish to use ACLs:
# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 253678 35764 197620 15% /
devfs 1 1 0 100% /dev
/dev/ad0s1e 253678 22 233362 0% /tmp
/dev/ad0s1f 8077406 3045460 4385754 41% /usr
/dev/ad0s1d 253678 21048 212336 9% /var
On my system, I wanted to enable ACLs only for users, so I configured only the /usr filesystem.
The FreeBSD handbook explains the advantages of using the tunefs command to enable ACLs. The disadvantage is that it requires bringing the system down to single-user mode and unmounting the filesystem. Choose a time that will least impact users; once you're sure no one is connected to the system, use the following:
# shutdown now
Enter full pathname of shell or RETURN for /bin/sh:
# /sbin/umount /usr
# /sbin/tunefs -a enable /dev/ad0s1f
tunefs: ACLs set
# /sbin/mount /usr
Use your output from df to know the name of the device on which you wish to enable ACLs (-a).
Then, to see if it worked:
# /sbin/mount
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s1e on /tmp (ufs, local, soft-updates)
/dev/ad0s1f on /usr (ufs, local, soft-updates, acls)
/dev/ad0s1d on /var (ufs, local, soft-updates)
And to bring the system back to multiuser mode:
# exit
That's it. ACLs are now enabled on /usr.
=================================================
剩下的事儿就是使用setfacl 。
回头想想,难怪这么好用的freebsd在国内使用范围不广,原因。。。。。。
建议和我一样曾经遇到、现在还在疑惑某些问题的朋友,多多浏览英文网站吧!结果会超出你的想象。仅仅是多花些时间而已。
这个坛子有个精典的现象:80%的人路过、20%的人可能会回帖!继续支持freebsd !!! |
评分
-
查看全部评分
|