Search Linux commands by purpose or symptom
Even if you do not remember the command name, you can narrow candidates from a Japanese purpose or Error Message and check Syntax, Options, and risk.
Open Linux command list/search cheat sheetConclusion: Identify the required action and the layer that denied it, then correct only the minimum permissions
Decide whether read, write, or execute/search is needed, then check the execution User and Mode of each Path Component. If the Owner differs, chown or Group design is required rather than chmod.
whoami
id
ls -ld /path /path/to /path/to/file
stat /path/to/file
chmod 777 gives everyone read, write, and execute permissions. Do not use it as a universal fix without identifying the cause.
Check the status first
Check search permission for every directory in the path, not only the target file.
| Account to check | Command examples | judgment |
|---|---|---|
| Execution user | whoami / id | Owner and Group membership |
| Target mode | ls -l / stat | Insufficient r/w/x |
| Parent Directory | ls -ld for each directory level | Missing x |
| Additional controls | getfacl / SELinux / mount | Denied outside the mode |
Linux commands to use and commonly used options
| Commands and syntax | role | Check points |
|---|---|---|
| ls -l / ls -ld | Check mode, owner, and group | The first character is the file type |
| chmod | Change the mode | Symbolic or Octal |
| chown / chgrp | Change Owner and Group | Administrative permissions and scope of impact |
| id | Check User / Group | Also check the Process execution User. |
Steps to isolate the issue safely
- Break down rejected operations into read, write, and execute.
- Check the execution user and group.
- Check the mode of the target and parent directory.
- Check ACL, SELinux, noexec, and similar settings.
- Change permissions to the minimum necessary principals and check again.
How to read the output and common causes
Mode display has three sets: owner, group, and other. Directory x is the search permission that allows reaching contents beneath it.
| Display and symptoms | Meaning and possible causes | Next check |
|---|---|---|
| -rw-r----- | Owner rw, Group r | Relationship to the execution user |
| drw-r--r-- | No execute permission on the directory | Traversal unavailable |
| Operation not permitted | Owner, Capability, and similar values | Confirm the execution principal |
| Denied even when the mode is correct | ACL, SELinux, and mounts | Additional access control |
Remedies and dangerous operations
Record the previous mode and owner/group, then make limited changes while preserving a reversible state.
| purpose | Suggested actions | Caution |
|---|---|---|
| Add execution permission for the owner | chmod u+x FILE | Also check Script content. |
| Add read permission to the group | chmod g+r FILE | Verify group membership |
| Fix Owner | chown USER FILE | Check the Service execution User. |
Because granting sudo, recursive chmod/chown, and changing permissions to 777 have a broad impact, prepare a target list and Rollback plan.
Check command implementation, distribution, and shell differences
Commands on Linux are not all provided by one project. Their implementations differ among GNU Coreutils, GNU Grep, GNU Findutils, procps-ng, iproute2, systemd, OpenSSH, curl, and others, and options and output vary with BusyBox and BSD implementations.
| Account to check | How to check | judgment |
|---|---|---|
| What the command refers to | type -a NAME / command -V NAME | Distinguish built-ins, aliases, functions, and externals |
| Implementation and version | NAME --version / package information | Check whether the article's options are available |
| Shell in use | printf "%s\n" "$SHELL" / Process information | Check syntax differences such as Pipeline and Redirect. |
| Distribution | /etc/os-release | Check the Package Manager and Service Manager. |
Examples in the article are based on a typical GNU/Linux environment. Before running them, prioritize that device's man pages, --help output, and official documentation.
What can be checked with DevelopTools' Linux command search
| Function | What you can check |
|---|---|
| search | Command name, purpose, Japanese and English keywords, and error keywords such as Permission denied |
| Filter | Category, risk level, required permissions, command type, and environment |
| Category | External Command, Shell Builtin, Shell Operator, Redirection Operator |
| Details | Syntax, main Options, Example, implementation source, related Commands, common Errors |
| Safety | Display normal operations, review-required operations, administrative operations, and destructive operations with text labels |
| Unsupported | Terminal connection, Command execution, Server status diagnostics, Installed Version auto-detection |
Perform final verification with official documentation
Prioritize the manual that matches the implementation and version in use. If examples on the web do not match the options on your system, use the system's man pages and package information as the basis for judgment.
The Script returns Permission denied.
Check not only for missing x but also noexec Mount, Shebang, and Interpreter.
Record output and exit status before and after execution, and confirm that the operation affected only the intended targets.
- ls -l script.sh
- Check the executing User and parent Directory
- If needed, chmod u+x script.sh
- Check Shebang, line breaks, and noexec.
You can also use a chmod permission calculator for permission calculations, but check the actual file state on the device.
Frequently asked questions
- Can I run commands from an article directly in production?
- Do not run it as-is. Check the Placeholder, target Path, PID, Host, executing User, and expanded Wildcards, then try it incrementally starting with read-only commands.
- Can I use the same Options on Linux?
- It varies by implementation, Distribution, Version, BusyBox environment, and more. Check type, --version, man, --help, and official Documentation.
- Does DevelopTools execute Linux commands?
- It is not executed. Search, filtering, display, and Copy occur only in the browser and do not connect to a Terminal or Server.