Techub Knowledge Center
TechubKnowledge Center • Illustrated Guides • Troubleshooting

Describe the Linux task or exact error — for example, updates fail or a drive will not mount.

Files, Folders & Permissions • Linux & Open Source

Fix Linux File & Folder Permissions

Inspect owner, group, parent directories and other access rules before making a narrow correction.

DifficultyIntermediate; owner or authorized administrator
Time20–45 minutes for checks; installation, backup or recovery can take longer
Guide typeIdentify, act & verify
GoalProtect files and verify the Linux task

Protect the data first. Work only on systems, files and accounts you own or are authorized to manage. Identify the exact distribution, device and path before changes. Keep independent verified backups and required recovery keys. Do not format wanted data, run unexplained privileged commands or apply broad permission resets. A filesystem repair needs its supported unmounted/offline procedure. Plan console access and downtime for remote or service changes.

First — identify the distribution, context and task

Record the distribution/release, desktop or server role, account, target path or device and exact error. These guides label Ubuntu and GNOME examples; other distributions, desktops and app versions use different controls. Use supported instructions for your actual release. Screenshots illustrate sample values and are not evidence of your system state. Read each command and its target before using it.

What you’ll need

Current distribution and application documentation · Authorized ordinary account and elevation only when needed · Private error/time notes · Independent backups and required keys · Correct device/path identity · Console and recovery plan for disruptive changes

Step 1 — Define the intended access

Record the exact account, file/folder and operation that should be allowed or denied. Get the data owner’s approval before widening access. Identify local, network and removable filesystems separately.

What to look for: A specific access requirement.

What the result means: Permission denied is not a reason to grant all users full access.

Step 2 — Read ownership and ordinary mode bits

Use Files Properties and its permissions view where available, or a supported ls -l listing for the intended object. Read owner, group and other rights separately. A sample -rw-r----- means owner read/write, group read and no ordinary other rights.

The sample -rw-r----- is a regular file with owner read/write, group read and no ordinary other rights. Directory traversal and additional policies must be assessed separately. Techub concept diagram, not a terminal or application screenshot.
The sample -rw-r----- is a regular file with owner read/write, group read and no ordinary other rights. Directory traversal and additional policies must be assessed separately. Techub concept diagram, not a terminal or application screenshot.Image: Techub · Source · View full-size image

Read a file and its containing directory separately

For paths you are authorized to inspect, ls -ld -- "/home/alex/Reports" shows the directory itself and ls -l -- "/home/alex/Reports/report.txt" shows the file. These are invented paths; substitute the actual intended objects. Start as the ordinary account that receives the error.

In -rw-r-----, the first character identifies a regular file, then the triplets describe owner, group and other access. For a directory, read permits listing names and execute/search permits traversing it. Editing a file’s contents and creating, renaming or removing directory entries are different operations. ACLs and additional policy can further affect the result.

What to look for: The identity class and specific missing right.

What the result means: Read, write and execute mean different things for a regular file and a directory.

Step 3 — Check parent directories and account membership

Use id to inspect the actual account’s groups and inspect the path’s parent directories. Directory execute/search permission is needed to traverse a path. A new group membership may require a new login session to take effect.

What to look for: Every relevant boundary along the actual path.

What the result means: Rights on the final file alone may not permit access to it.

Step 4 — Review filesystem and policy differences

Check ACLs, read-only mounts, network-server permissions and application confinement when relevant. FAT/exFAT and some mounted shares do not behave like native Linux ownership. Do not disable SELinux or AppArmor to bypass an unexplained denial.

What to look for: The layer that actually controls the failed operation.

What the result means: Changing basic mode bits cannot solve every filesystem or security-policy issue.

Step 5 — Apply only the needed correction

For a file you own, use its documented permissions control or a narrowly scoped symbolic change after understanding it. Ownership or system-file changes require the responsible administrator. Do not use chmod 777, recursive chown on system trees or blanket inheritance resets.

Example of a deliberately narrow change

If you own the actual regular file, the data owner approves the access, and the confirmed issue is that its owner-read bit is missing, chmod u+r -- "/home/alex/Reports/report.txt" adds that bit to that file. It does not recursively change the folder, grant everyone access or solve an ACL/mount/policy denial. The path is illustrative: check your real target and record its current mode before making any change. If the listing identifies a symbolic link rather than the intended regular file, resolve its target first; chmod can affect the file it points to.

Afterward run the original read operation as the intended user and recheck the listing. If it still fails, inspect the parent-directory and policy checks rather than escalating to broad permissions.

What to look for: One intended object or carefully reviewed scope.

What the result means: A broad correction can expose private data and break system or application expectations.

Step 6 — Test allowed and denied actions

As the intended ordinary user, test the required read/write task. Confirm an unauthorized account remains denied where applicable. Record prior and final settings privately, then check the application that raised the original error.

What to look for: Required access works without unnecessary exposure.

What the result means: A successful root test does not verify the normal account’s effective rights.

What did you find?
A parent blocks traversalReview that directory’s intended search access.
Group membership is staleUse an approved new session after the authorized change.
A mount, ACL or confinement rule appliesFollow that layer’s supported procedure.
The narrow correction worksConfirm required access and preserved restrictions.
Distribution, desktop & application help

Use current official documentation for the exact distribution, release, desktop, filesystem, network manager and application. Ubuntu 26.04 installer examples are not universal Linux menus. GNOME app catalog screenshots illustrate the named app and may show a different version from the one installed.

Production services, encrypted storage, directory-managed users and unusual filesystem layouts need their responsible administrator and supported recovery procedure. Start with the exact error rather than a generic root command. Keep credentials, keys, private logs and backup contents out of public posts.

Parts & supplies — only if needed

Most initial checks use the supported tools already available. Buy a USB drive, backup destination or replacement hardware only when the task requires it, after checking exact hardware, capacity, power and distribution support.

Technical references

Techub’s troubleshooting guides are written in plain language and informed by manufacturer documentation. Features and procedures can vary by model. Before following model-specific steps, check the manufacturer’s latest instructions for your exact device.

Set file permissionsDebian — chmod(1) — coreutils — Debian trixie — Debian ManpagesTechub — linux open source.htmlDebian / GNU Coreutils — ls file and directory listings

Still need help?

Need help with a Linux task?

Bring the distribution/release, desktop or server context, exact error and checks already tried. Explain whether wanted data has a usable independent backup. Keep credentials, keys, private paths and diagnostic data out of public screenshots.

Visit Techub Services ↗