If you can see this check that

next section prev section up prev page next page

Directory access

Directory access has the same three classes of ownership as files; owner, group, and other. Directory permissions however have slightly different meanings from those of files.

For example:

% ls -ld projects
drwxr-xr--.  1  john   staff 1032 Nov 18 12:25   projects
In this example "projects" is a directory, owned by "john" in group "staff". It was last changed this year on November the 18th at 12:25. If it was a previous year the year would be shown and the time would not be visible. The size of 1032 indicates only the size of the directory metadata, which is not really useful to most mortals, and has almost nothing to do with the size of the files within the directory. Members of the group staff may list the contents of the directory projects and access files within it. Others may only list the directory contents.

The "d" in the flag list is very important. The default behaviour of the "ls" command when asked to consider a directory is to show the CONTENTS of a directory rather than information on the directory itself. If you need the ls command to tell you about a directory entry rather than the contents of a directory you MUST use "-d".


Centos 7 intro: Paths | BasicShell | Search
Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net SELinux1 SELinux2 fwall DNS diag Apache1 Apache2 log Mail
Caine 10.0: Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Mock Exam |
CPD: Cygwin | Paths | Files and head/tail | Find and regex | Sort | Log Analysis
Kali: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7a | 8a | 8b | 9 | 10 |
Kali 2020-4: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7 | 8a | 8b | 9 | 10 |
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions

Linuxzoo created by Gordon Russell.
@ Copyright 2004-2023 Edinburgh Napier University