permissions_for_directories
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| permissions_for_directories [2016/07/25 19:10] – walkeradmin | permissions_for_directories [2017/01/29 18:00] (current) – walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Permissions for Directories ====== | ====== Permissions for Directories ====== | ||
| - | \\ | + | <color darkorange> |
| + | |||
| + | ---- | ||
| \\ | \\ | ||
| The same series of permissions may be used for directories but they have a slightly different behaviour. | The same series of permissions may be used for directories but they have a slightly different behaviour. | ||
| \\ | \\ | ||
| - | r - you have the ability to read the contents of the directory (ie do an ls) | + | |
| - | w - you have the ability to write into the directory (ie create files and directories) | + | w - you have the ability to write into the directory (ie create files and directories) |
| - | x - you have the ability to enter that directory (ie cd) | + | x - you have the ability to enter that directory (ie cd) |
| \\ | \\ | ||
| + | Example: | ||
| + | \\ | ||
| + | ls testdir (list testdir contents) | ||
| + | file1 file2 file3 | ||
| + | | ||
| + | chmod 400 testdir (400 is 100000000) so r--- --- --- | ||
| + | | ||
| + | cd testdir (change directory to testdir) | ||
| + | -bash: cd: testdir: Permission denied | ||
| + | chmod 100 stops access to a directory | ||
| + | \\ | ||
| + | \\ | ||
| + | Example2: | ||
| + | \\ | ||
| + | chmod 100 testdir - (100 = 001000000 or --x --- --- so execute rights only) | ||
| + | | ||
| + | ls testdir | ||
| + | ls: cannot open directory testdir: Permission denied | ||
| + | | ||
| + | cd testdir - I can't list the director, but I can change to it | ||
| + | cat file1 - and I can view a file I know exists! | ||
| + | | ||
| + | this is a test file | ||
| + | you have opened it | ||
| + | \\ | ||
| + | \\ | ||
| + | I am sure I'll find a use for that? :) | ||
| + | \\ | ||
| + | \\ | ||
permissions_for_directories.1469473802.txt.gz · Last modified: (external edit)
