To see a Linux directory’s own permissions and owner, use ls -ld, not just ls -l. The -l option requests a long listing; -d tells GNU ls to list the directory itself instead of listing its contents. This small distinction prevents a common troubleshooting mistake: reading a child file’s permissions as though they belonged to its parent folder.
Choose the object before interpreting the permissions
Suppose an application reports trouble with an uploads directory. A long listing of that directory normally shows the files inside it. Their owners and modes can be perfectly reasonable while the directory itself has different metadata. Conversely, an empty directory can produce no child entries even though it still has an owner, group and permissions.
For a first harmless inspection of your home directory, run:
ls -ld -- "$HOME"
The double quotes preserve spaces in the expanded path. The double hyphen ends option processing so a pathname beginning with a hyphen is not interpreted as another option. This command displays metadata; it does not change ownership, permissions or file contents.
Read the long listing without overclaiming access
A normal directory’s long listing begins with d. The following mode characters show owner, group and other permissions. The listing also includes a hard-link count, owner, group, size, timestamp and pathname. GNU’s manual explains these fields and notes that additional markers can indicate access-control or security-context information.
Do not mistake a directory’s size column for the total size of every file beneath it. It describes the directory object rather than a recursive storage calculation. For that separate question, see checking folder usage with du without crossing other filesystems.
Likewise, a plausible owner and mode are not proof that a particular service can use the path. The service’s identity, ancestor directories, ACLs, security policy and mount conditions may matter. Capture the listing as evidence before proposing a change; do not jump directly to recursive chmod or chown.
Try the difference in an isolated practice directory
This Bash example creates only a disposable directory and an empty practice file. The cleanup removes those two objects and the temporary directory; it does not touch an existing application folder. Run the entire block in the same shell so the temporary-path variable remains available.
work=$(mktemp -d) || exit 1
mkdir -- "$work/reports"
touch -- "$work/reports/example.txt"
printf 'Contents listing:\n'
ls -l -- "$work/reports"
printf 'Directory listing:\n'
ls -ld -- "$work/reports"
rm -- "$work/reports/example.txt"
rmdir -- "$work/reports" "$work"
In the first listing, look for the regular-file entry named example.txt. In the second, look for a directory entry naming reports itself. Your owner, timestamps and size values depend on your machine; the important comparison is which object each command describes. If a creation step fails, stop and inspect the error instead of adapting the cleanup to unrelated paths.
Keep symbolic links separate from their targets
With GNU ls, -ld normally describes a symbolic link passed on the command line rather than following it. That is useful when a path is a shortcut to a directory elsewhere. Adding -L explicitly requests information about the referenced object:
ls -ld -- "./reports-link"
ls -ldL -- "./reports-link"
These are alternative inspection commands for an existing link, not instructions to create one. Use the exact link name without appending a slash when you intend to inspect the link itself. The target-following command can fail if the target is missing or cannot be reached. Do not infer that the target exists merely because the link entry can be listed.
Quick questions before changing anything
- Does -d mean recursive? No. It selects the directory object instead of its contents. Recursive listing is a different operation.
- Does the command need sudo? Start as your normal user. Elevated inspection may hide the access problem experienced by the application.
- What should a support ticket include? Record the exact path, command, output, error and identity of the affected process. Remove sensitive path details before sharing publicly.
- How do I undo the inspection? The read-only listing needs no rollback. Only the practice fixture creates disposable files.
Source: GNU Coreutils upstream manual source, particularly the sections on which files are listed and long-format information.
Safety: This tutorial is for educational purposes. Test examples carefully before production use. The site owner is not responsible for misuse, damage, data loss or production issues.



