Courses/Computer Science/CPSC 457.W2012/Lecture Notes/Filesystems

From wiki.ucalgary.ca
< Courses‎ | Computer Science‎ | CPSC 457.W2012‎ | Lecture Notes
Revision as of 17:34, 9 April 2012 by Locasto (talk | contribs) (Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

File Systems

In this session, we will consider what a file system is and what its role is as a data storage and namespace management infrastructure.

We will look at how it supports indexing file structure, using the Unix File System and the ext2/3/4 file systems as examples.

Notes

Slides

file block translation in ext2/3 https://s3-ap-northeast-1.amazonaws.com/booksikindle/html/Understanding%20the%20Linux%20Kernel1/dummy_split_431.html

struct inode

http://pages.cpsc.ucalgary.ca/~locasto/teaching/2012/CPSC457/code/jailed.txt

  • you need to copy at least the dynamically linked libraries that the app needs; you can use the ldd utility to list them
  • or you can statically compile and link your program so it brings what it needs.
  • programs may also depend on other utilities in /usr/bin/ or /bin (i.e., they may fork off a process to accomplish some task)

http://pages.cpsc.ucalgary.ca/~locasto/teaching/2012/CPSC457/code/escapejail.txt

  • note that using a symbolic link to get out doesn't work, but a hard link does; however:
  • this link needs to be set up beforehand -- you can't create such a link once chroot'd

script demonstrating semantics of Directory Permissions

Reading

  • MOS, Chapter 4.3: File System Implementation
  • MOS, Chapter 4.5: Example File Systems
  • MOS, Chapter 10.6: The Linux File System
  • (optional) ULK, Chapter 1: SS: An Overview of the Unix Filesystem (pp 12---19)