utils-fix-permissions
Skill309 starsChanged 4 months agoApache-2.0View on GitHub
Fix file permissions on a directory tree on an HPC cluster (Leonardo, Jupiter, TACC, etc.) so other users can read your shared data, conda envs, or work directories. Runs `scripts/permissions/fix_permissions.sh <dir>` over SSH on the target cluster — sets directories to 755, files to 644, then restores execute bits on bin/ entries, ELF binaries, and shebang scripts, and ensures all ancestor directories are traversable (o+x). Use when another user reports "Permission denied" reading your files, after creating a new conda env or shared data dir, or when a cross-user pipeline can't access your checkpoint/ eval/trace outputs.
- Installs packages
In this repository50 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-datagen-campaign-summarySkill
- analyze-dataset-token-lengthSkill
- analyze-id-eval-rankingSkill
- analyze-job-history-irisSkill
- analyze-rl-behaviorSkill
- analyze-training-run-irisSkill
- build-tpu-image-irisSkill
- code-create-staged-planSkill
- code-execute-staged-planSkill
- commitSkill
- crud-archive-runSkill
- crud-otagent-supabaseSkill
- crud-purge-below-gate-evalsSkill
- crud-purge-stale-eval-placeholdersSkill
- datagen-create-task-datasetSkill
- datagen-job-cleanupSkill
- datagen-launch-irisSkill
- datagen-launchSkill
- datagen-reduce-dataset-snapshotsSkill
- datagen-standard-launchSkill
- debugSkill
- docs-deslopSkill
- eval-agentic-cleanupSkill
- eval-agentic-launch-irisSkill
- eval-agentic-launchSkill
- eval-standard-cleanupSkill
- eval-standard-launchSkill
- file-issueSkill
- monitor-cron-sweep-irisSkill
- monitor-cron-sweepSkill
- monitor-job-tablesSkill
- monitor-restore-irisSkill
- monitor-restoreSkill
- monitor-restore-unifiedSkill
- rl-agentic-job-cleanupSkill
- rl-agentic-launch-irisSkill
- rl-agentic-launch-jupiterSkill
- rl-job-health-deep-diveSkill
- rl-standard-job-cleanupSkill
- rl-standard-launch-leonardoSkill
- serve-model-vibe-testSkill
- sft-cleanup-hf-onlySkill
- sft-job-cleanupSkill
- sft-launchSkill
- supervisor-initSkill
- utils-cleanup-stale-sandboxesSkill
- utils-reclaim-stale-snapshotsSkill
- write-testsSkill
- writing-styleSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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 70
Use chmod -R g+w <dir> when shared editing is required.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
utils-fix-permissions
Set shared-readable permissions on an HPC directory tree.
When to use
- Another user reports "Permission denied".
- A shared conda env or data directory needs read access.
- A cross-user pipeline cannot read checkpoint, eval, or trace output.
rsyncorscppreserved 600/700 permissions.
What it does
scripts/permissions/fix_permissions.sh <dir> performs these passes:
| Pass | Action |
| 0 | Ensure all ancestor directories up to / are traversable (o+x) — only touches dirs you own |
| 1 | Set all directories to 755 (rwxr-xr-x) |
| 2 | Set all files to 644 (rw-r--r--) |
| 3 | Restore 755 on executables in bin/ directories |
| 4 | Restore 755 on ELF binaries (detected by \x7f ELF magic header) |
| 5 | Restore 755 on shell scripts with shebang (#!) |
Files remain owner-writable; collaborators receive read and execute.
How to invoke
SSH to the target cluster and run the script from the repo root:
# Leonardo example
ssh Leonardo 'cd $WORK/OpenThoughts-Agent && bash scripts/permissions/fix_permissions.sh /leonardo_work/AIFAC_5C0_290/bfeuer00'
# TACC example (large tree — run on a compute node if login node is loaded)
ssh TACCVista 'cd $SCRATCH/OpenThoughts-Agent && bash scripts/permissions/fix_permissions.sh $SCRATCH/eval_jobs'
# Jupiter example
ssh Jupiter 'cd $DCFT && bash scripts/permissions/fix_permissions.sh /p/home/../../public'Large directories
For big trees, use an interactive compute node:
# TACC
ssh TACCVista 'srun -p gh-dev -N 1 -n 1 -t 08:00:00 --account=CCR24067 bash -c "cd $SCRATCH/OpenThoughts-Agent && bash scripts/permissions/fix_permissions.sh $SCRATCH/miniconda3"'
# Leonardo (idev or sbatch)
ssh Leonardo 'srun -p boost --account=AIFAC_5C0_290 --time=08:00:00 -N 1 bash -c "cd $WORK/OpenThoughts-Agent && bash scripts/permissions/fix_permissions.sh $WORK"'Gotchas
- Use
chmod -R g+w <dir>when shared editing is required. - Rerun after
pip installfor a shared conda environment. - Pass 0 changes only owned NFS directories.
- Safe to rerun; it is idempotent.
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.

