storage-permissions
Skill2 starsChanged 57 days agoMITView on GitHub
Explain why a path is unreadable or unwritable on Termux (missing storage link, revoked Android permission, scoped storage, a filesystem without Unix modes or symlinks, a proot bind that was never made) and choose where files should live. Use for Permission denied, a missing ~/storage, /sdcard access, or git and venv failures on shared storage. Do NOT use for Termux API permission errors (see termux-api) or for ordinary file mode problems under $HOME.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- background-processesSkill
- git-credentialsSkill
- github-actionsSkill
- node-native-buildSkill
- package-troubleshootingSkill
- proot-boundariesSkill
- python-native-buildSkill
- termux-adbSkill
- termux-apiSkill
- termux-backupSkill
- termux-environmentSkill
- termux-networkSkill
- termux-servicesSkill
- termux-sshdSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Prefer $HOME unless the task needs the file to be visible to other Android apps.
- Distinctive: line 46
Check only the requested path, with a harmless read the user chose.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android Storage Permissions
Purpose
Say which kind of path this is (private Termux storage, a shared-storage link, a proot-visible path, or an Android permission boundary) and what that means for permissions, symlinks, and executables.
When to use
Permission deniedon/sdcard,~/storage/..., or a path outside$HOME.~/storageis missing, empty, or its links point nowhere.- A tool works in Termux but not in proot.
- git, a venv, or an executable misbehaves on shared storage.
When NOT to use
termux-*API errors: usetermux-api.- Unix mode problems on files that live under
$HOME: ordinaryls -landchmodreasoning applies.
Preconditions
Capture, read-only: pwd, $HOME, the failing path, and sh scripts/check-storage.sh. Do not list or print unrelated private filenames from shared storage.
Decision tree
~/storage/sharedabsent in native Termux: storage access was never set up, or the links were deleted.- Links present but access denied: Android permission was revoked, often by the system's "remove permissions if app is unused" auto-reset. Re-granting happens in Android settings or by confirmed
termux-setup-storage. - Shared storage is a FUSE-style filesystem. It has no Unix owner or mode bits, no symlinks, and no executable bit. Consequences:
chmodhas no effect, venvs fail, git reports every file as mode-changed, scripts cannot be executed in place. Keep repositories, venvs, and keys under$HOME; use shared storage only for exchange files. - A Unix mode bit is not proof of Android permission, and a granted Android permission does not give Unix rights.
- Other apps'
Android/dataandAndroid/obbare blocked by scoped storage on recent Android. Do not try to work around it. - Inside proot a path is visible only if it was bound at login; a Termux path is not automatically present.
- Prefer
$HOMEunless the task needs the file to be visible to other Android apps.
Example
- Situation: python -m venv under /sdcard fails with a symlink or permission error.
- Without the skill: Runs
chmod -R 777, which has no effect on shared storage. - With the skill: Explains that shared storage has no Unix modes, symlinks, or executable bit, moves the repository and venv under
$HOME, and keeps only exchange files on shared storage.
Safety
termux-setup-storage changes user-visible links and shows an Android dialog: ask first. Never create, move, or delete files in shared storage without approval, and never run chmod or chown loops against it.
Verification
Check only the requested path, with a harmless read the user chose. A write test needs approval and a throwaway filename in a directory the user named.
Handoffs
termux-environmentwhen Android version or the native/proot side is unknown.proot-boundarieswhen the failure is only inside proot.termux-backupwhen the user wants an archive written to shared storage.git-credentialswhen keys were placed on shared storage.
Report
Which path class the failing path belongs to, which of the rules above applies, and the single recommended change (a permission grant, a bind, or moving the file under $HOME).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

