Operating Systems 2017F Lecture 20: Difference between revisions
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
In the SSH there is the filesystem type "fuse.sshfs" <br> | In the SSH there is the filesystem type "fuse.sshfs" <br> | ||
When you run strace on ls on the two terminals (ssh connection and the local one) you see similar output <br> | When you run strace on ls on the two terminals (ssh connection and the local one) you see similar output <br> | ||
When we run "ls" on an ssh-mounted filesystem <br> | When we run "ls" on an ssh-mounted filesystem <br> | ||
* ls makes system calls (open, getdents) to the local Linux kernel <br> | * ls makes system calls (open, getdents) to the local Linux kernel <br> | ||
Line 25: | Line 24: | ||
* local sshfs process responds to FUSE request (via system calls)<br> | * local sshfs process responds to FUSE request (via system calls)<br> | ||
* FUSE passes data back to vfs layer, then back to requesting process <br> | * FUSE passes data back to vfs layer, then back to requesting process <br> | ||
<br> If you look as lsmod | less you see a ton of modules. Some of the modules are not necessary to mount the root filesystem.<br> | <br> If you look as lsmod | less you see a ton of modules. Some of the modules are not necessary to mount the root filesystem.<br> | ||
ls /lib/modules there are directories that store the kernel modules <br> | ls /lib/modules there are directories that store the kernel modules <br> | ||
Line 31: | Line 29: | ||
This is the initial RAM disk. This filesystem loads the modules needed for the real filesystem. <br> | This is the initial RAM disk. This filesystem loads the modules needed for the real filesystem. <br> | ||
To remove a file I need to remove the hardlink from the directory where the hardlink exists <br> | To remove a file I need to remove the hardlink from the directory where the hardlink exists <br> | ||
The password files maps usernames to user id's (Linux does nto care about your username) <br> | |||
Normal file access permission check br> | |||
- compare uid, gid of file with uid, gid of process <br> | |||
But really <br> | |||
- comapres it with fsuid, fs |
Revision as of 19:14, 28 November 2017
Insert non-formatted text here== Additional Notes ==
Assignment 4 will be autograded and in fill in the blank form. This will not be like the final exam.
You should think about who is doing what? Otherwise FUSE won't make much sense
Inode numbers completely changed when you use ssh. It starts with 1 from "." (root) and increments from there.
Inodes come from filesystem you are acessing
He used df to find filesystem info
The used Commands: mount | grep ubuntu and mount | grep vda1 to find type of filesystem
In the SSH there is the filesystem type "fuse.sshfs"
When you run strace on ls on the two terminals (ssh connection and the local one) you see similar output
When we run "ls" on an ssh-mounted filesystem
- ls makes system calls (open, getdents) to the local Linux kernel
- the local kernel sees the filesystem is FUSE, calls DUSE routines for open, getdents (via vfs abstraction)
- FUSE calls the sshfs process that mounted the filesystem
- sshfs process sends request to remote system
- via socket system calls
- remote sshd process receives request (via system calls)
- remote sshd process receives requests (via system calls)
- makes open, getdents sytem calls
- rmeote kernel checks vfs, calls ext4 routines to access data
- remote sshd process responds to requests (via system calls)
- local sshfs process receives response (via system calls)
- local sshfs process responds to FUSE request (via system calls)
- FUSE passes data back to vfs layer, then back to requesting process
If you look as lsmod | less you see a ton of modules. Some of the modules are not necessary to mount the root filesystem.
ls /lib/modules there are directories that store the kernel modules
You have to have a filesystem that you mount initially that has a bunch of modules in it. Thus, there is an initial root file system that is necessary to load everything else
This is the initial RAM disk. This filesystem loads the modules needed for the real filesystem.
To remove a file I need to remove the hardlink from the directory where the hardlink exists
The password files maps usernames to user id's (Linux does nto care about your username)
Normal file access permission check br>
- compare uid, gid of file with uid, gid of process
But really
- comapres it with fsuid, fs