Super block : ファイルシステムの管理情報を記録した場所。
I-node, block の総数、空き容量、ルートディレクトリの i-node 番号などを保持。
Super block はシリンダーグループ毎にバックアップを配置する。
多くは 8192 の倍数(オリジナルが 1 sector, バックアップが 8,193 / 24,577 など)
# dumpe2fs /dev/sda1 実行例dumpe2fs 1.39 (29-May-2006) Filesystem volume name: /boot Last mounted on:Filesystem UUID: b8075a1b-8a35-478f-8c68-ce2e92f28cc7 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 26104 Block count: 104388 Reserved block count: 5219 Free blocks: 75797 Free inodes: 26057 First block: 1 Block size: 1024 Fragment size: 1024 Reserved GDT blocks: 256 Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 2008 Inode blocks per group: 251 Filesystem created: Fri Jul 13 01:11:33 2012 Last mount time: Fri Aug 17 19:24:00 2012 Last write time: Fri Aug 17 19:24:00 2012 Mount count: 10 Maximum mount count: -1 Last checked: Fri Jul 13 01:11:33 2012 Check interval: 0 ( ) Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode: 8 Default directory hash: tea Directory Hash Seed: ef0d8a0a-ed25-4572-a6f5-a976eb757d16 Journal backup: inode blocks Journal size: 4114k Group 0: (Blocks 1-8192) Primary superblock at 1, Group descriptors at 2-2 Reserved GDT blocks at 3-258 Block bitmap at 259 (+258), Inode bitmap at 260 (+259) Inode table at 261-511 (+260) 0 free blocks, 1988 free inodes, 2 directories Free blocks: Free inodes: 21-2008 Group 1: (Blocks 8193-16384) Backup superblock at 8193, Group descriptors at 8194-8194 Reserved GDT blocks at 8195-8450 Block bitmap at 8451 (+258), Inode bitmap at 8452 (+259) Inode table at 8453-8703 (+260) 3746 free blocks, 2008 free inodes, 0 directories Free blocks: 8704, 12640-16384 Free inodes: 2009-4016 Group 2: (Blocks 16385-24576) Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1) Inode table at 16387-16637 (+2) 7939 free blocks, 2008 free inodes, 0 directories Free blocks: 16638-24576 Free inodes: 4017-6024 Group 3: (Blocks 24577-32768) Backup superblock at 24577, Group descriptors at 24578-24578 Reserved GDT blocks at 24579-24834 Block bitmap at 24835 (+258), Inode bitmap at 24836 (+259) Inode table at 24837-25087 (+260) 2555 free blocks, 1992 free inodes, 0 directories Free blocks: 25094-27648 Free inodes: 6041-8032 Group 4: (Blocks 32769-40960) Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1) Inode table at 32771-33021 (+2) 0 free blocks, 2008 free inodes, 0 directories Free blocks: Free inodes: 8033-10040 Group 5: (Blocks 40961-49152) Backup superblock at 40961, Group descriptors at 40962-40962 Reserved GDT blocks at 40963-41218 Block bitmap at 41219 (+258), Inode bitmap at 41220 (+259) Inode table at 41221-41471 (+260) 2157 free blocks, 1991 free inodes, 1 directories Free blocks: 43113, 46088, 46650, 46662-46664, 46979-47104, 47112-47616, 47624-48128, 48138-49152 Free inodes: 10043, 10059-12048 Group 6: (Blocks 49153-57344) Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1) Inode table at 49155-49405 (+2) 7939 free blocks, 2008 free inodes, 0 directories Free blocks: 49406-57344 Free inodes: 12049-14056 Group 7: (Blocks 57345-65536) Backup superblock at 57345, Group descriptors at 57346-57346 Reserved GDT blocks at 57347-57602 Block bitmap at 57603 (+258), Inode bitmap at 57604 (+259) Inode table at 57605-57855 (+260) 7681 free blocks, 2008 free inodes, 0 directories Free blocks: 57856-65536 Free inodes: 14057-16064 Group 8: (Blocks 65537-73728) Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1) Inode table at 65539-65789 (+2) 7939 free blocks, 2008 free inodes, 0 directories Free blocks: 65790-73728 Free inodes: 16065-18072 Group 9: (Blocks 73729-81920) Backup superblock at 73729, Group descriptors at 73730-73730 Reserved GDT blocks at 73731-73986 Block bitmap at 73987 (+258), Inode bitmap at 73988 (+259) Inode table at 73989-74239 (+260) 7681 free blocks, 2008 free inodes, 0 directories Free blocks: 74240-81920 Free inodes: 18073-20080 Group 10: (Blocks 81921-90112) Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1) Inode table at 81923-82173 (+2) 7939 free blocks, 2008 free inodes, 0 directories Free blocks: 82174-90112 Free inodes: 20081-22088 Group 11: (Blocks 90113-98304) Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1) Inode table at 90115-90365 (+2) 7939 free blocks, 2008 free inodes, 0 directories Free blocks: 90366-98304 Free inodes: 22089-24096 Group 12: (Blocks 98305-104387) Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1) Inode table at 98307-98557 (+2) 5830 free blocks, 2008 free inodes, 0 directories Free blocks: 98558-104387 Free inodes: 24097-26104 ACL 操作(6-5)
star(1) は別パッケージ。
================================================================================ Package Arch Version Repository Size ================================================================================ Installing: star i386 1.5a75-3 base 377 k~/public_html に apache に対するグループ許可を付与した例
実行例student$ pwd /home/student student$ ls -ld . drwx--x--x 24 student student 4096 9月 5 08:28 . student$ ls -ld public_html/ drwxr-x--- 2 student student 4096 8月 6 20:06 public_html/ student$ su apache パスワード: apache$ id uid=48(apache) gid=48(apache) 所属グループ=48(apache),504(vboxsf) apache$ ls -l public_htm ls: public_html: 許可がありません apache$ exit exit student$ getfacl public_html # file: public_html # owner: student # group: student user::rwx group::r-x other::--- student$ setfacl -m g:apache:rwx public_html student$ getfacl public_html # file: public_html # owner: student # group: student user::rwx group::r-x group:apache:rwx mask::rwx other::--- student$ su apache パスワード: apache$ ls -l public_html 合計 8 -rwxr-xr-x 1 student student 77 7月 20 18:06 a.cgi -rw-rw-r-- 1 student student 57 8月 6 18:34 index.html apache$ touch public_html/apache.tmp apache$ ls -l public_html 合計 8 -rwxr-xr-x 1 student student 77 7月 20 18:06 a.cgi -rw-rw-r-- 1 apache apache 0 9月 10 07:45 apache.tmp -rw-rw-r-- 1 student student 57 8月 6 18:34 index.html apache$ exit exit # ALC が付与されたファイルには、パーミッションの最後に + がつく student$ ls -ld public_html drwxrwx---+ 2 student student 4096 9月 10 07:45 public_html student$ ls -l public_html 合計 8 -rwxr-xr-x 1 student student 77 7月 20 18:06 a.cgi -rw-rw-r-- 1 apache apache 0 9月 10 07:45 apache.tmp -rw-rw-r-- 1 student student 57 8月 6 18:34 index.htmlstar (6-13)
star のオプション
# cd /testdir # star -c -Hexustar -acl . | ( cd /backup/star ; star -xp -acl )