Skip to content

Commit 8c90862

Browse files
committed
docs(research): add /etc/skel deep dive with concrete defaults and perms
Specify directory layout, file modes, templates, CGI cautions, ansible role shape, and doc links for a first-class skeleton.
1 parent 09e6c34 commit 8c90862

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.kiro/references/research.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,50 @@ These are consolidated notes from the repos cloned into `.kiro/references/`. Foc
307307
- website/ (Project Segfault)
308308
- Integrate status/news feeds if we run a blog/status; else link out.
309309

310+
## Skeleton (`/etc/skel`) deep dive and recommendations
311+
312+
Goals: secure defaults, great first-run UX, and compatibility with userdir (web), Gemini, Gopher, and optional services.
313+
314+
- Directory layout and permissions
315+
- `$HOME` (created by useradd): mode 0711 (traversable without listing); owner `user:user`.
316+
- `~/.ssh/`: 0700; `authorized_keys`: 0600; optional `config`: 0600 with minimal, non-host-specific examples commented out.
317+
- `~/public_html/`: 0755; include `index.html` (simple welcome) and `README.txt` with next steps; CGI folder `~/public_html/cgi-bin/` with 0755, sample script non-executable by default.
318+
- `~/public_gemini/`: 0755; `index.gmi` with a few links to docs.
319+
- `~/public_gopher/`: 0755; `gophermap` or `index.txt` per server’s expectation.
320+
- Optional: `~/bin/` (0755) added to PATH in shell rc; `~/projects/` (0755).
321+
322+
- Default files
323+
- `.bashrc`/`.bash_profile` or `.zshrc`: source `/etc/profile`, set `PATH` to include `~/bin`, add helpful aliases (ls -lah, grep --color), and a brief MOTD pointer.
324+
- `.profile`: minimal, non-duplicative, to support non-bash logins.
325+
- `.plan` and `.project`: 0644 with a template encouraging users to personalize; compatible with `finger`/`efingerd`.
326+
- `.hushlogin`: optional to suppress verbose login banners; we recommend keeping MOTD pointers visible initially.
327+
- `README_FIRST.txt`: short “first 10 minutes” checklist (upload key, create web page, join IRC/Usenet, where docs live).
328+
329+
- Web userdir and CGI guidance
330+
- Ensure nginx userdir config reads from `~/public_html`, and tests enforce security headers and userdir routing.
331+
- Include `public_html/README_CGI.txt` explaining security risks; default per-user CGI disabled at server level unless explicitly enabled.
332+
333+
- Gemini and Gopher
334+
- Provide minimal `index.gmi` and `gophermap` templates; link to service catalog and rules.
335+
336+
- Mail and forwarding (optional)
337+
- If `~/.forward` supported, document carefully; do not ship by default.
338+
339+
- Shell and editor
340+
- Offer commented samples in rc files for setting `$EDITOR` (nano/vim) and enabling useful prompt; avoid opinionated themes by default.
341+
342+
- Ansible role implementation
343+
- Idempotent tasks to create directories/files with exact modes.
344+
- Templated `index.html`, `index.gmi`, `README` files; jinja variables for instance name.
345+
- Post-provision hook to fix permissions if users pre-exist.
346+
347+
- Security notes
348+
- Enforce home 0711 to allow web traversal but not listing.
349+
- `.ssh` strict modes; fail2ban covers sshd; recommend ed25519 keys with `-a 100` in docs.
350+
351+
- Documentation
352+
- Link skel templates to `/docs` pages: SSH keys, userdir, Gemini/Gopher, CGI, IRC/Usenet, CoC.
353+
310354
## Notable references (files skimmed)
311355

312356
- Ansible production patterns: `.kiro/references/ansible/README.md`

0 commit comments

Comments
 (0)