TP 2.2: Find files and control data access
Goal: Find and protect data.
You did some manipulation on files in TP 2.1 and you want to be sure that nobody on the cluster can access your data. Answer the questions to deny access to others.
Search for files¶
Question
From your home directory, search the files named ab*.fasta with find command.
/home/<username> <- you are here
├── save
└── work
Display help in order to find the option that search into save and work directories that are symbolic links.
Solution
First try:
It display nothing, which is not what we expected. Then we check the manual:
Finally, we use the right option:
Search files by criterion¶
Question
From the directory ~/save/tp_linux, search files with size greater than 100KB.
/home/<username>
├── save
│ └── tp_linux <- you are here
└── work
Solution
Manage read permissions¶
Question
In the same directory ~/save/tp_linux, remove the everyone's read permission from the directory data.
/home/<username>
├── save
│ └── tp_linux <- you are here
└── work
Can you list the content of data ?
Add yourself back the read permission (r) on this directory.
Solution
Manage execution/traversal permissions¶
Question
Remove everyone's execution permission from directory data.
Could you enter inside the directory data?
Add yourself back the execution permission (x) on this directory.
The execussion access on a directory allows traverval of this directory.