17 Commits
Author SHA1 Message Date
marcandClaude Sonnet 4.6 9f060660a1 v1: cleanup, dead code removal, docs update
app.py:
- Move warnings import to top-level imports
- Remove MICRONAS_SECRET env var (undocumented, unnecessary)
- Inline secret key derivation cleanly

CLAUDE.md:
- Remove stale quotas mention
- Add WebDAV, setup.html, favicon to file layout
- Document /etc/micronas/ permissions requirements
- Document <Location> vs <Directory> for WebDAV DAV On

PLANNING.md:
- Mark Phase 5 complete with all shipped items
- Add v1 complete marker and future ideas section

README.md:
- Simplify dev/test section (remove complex hash snippet)
- Fix double blank line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 19:20:24 +02:00
marcandClaude Sonnet 4.6 b6179865b5 Remove user rename feature; add www-data hint in WebDAV edit modal
- Removed PATCH /api/users/<name> route (rename_user)
- Removed renameModal from index.html
- Removed openRenameModal/submitRename from users.js
- Removed Rename button from users table
- Removed rename docs from README
- Added green info box in WebDAV edit modal: set group=www-data, mode=775

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:01:56 +02:00
marcandClaude Sonnet 4.6 f081496b4b README: remove one-time migration section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:58:27 +02:00
marcandClaude Sonnet 4.6 7ec926ddf7 Fix /etc/micronas dir permissions: 750 root:www-data so Apache can traverse
700 blocked www-data from entering the dir even though the passwd file
had correct group permissions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:54:25 +02:00
marcandClaude Sonnet 4.6 aef2e8a01b README: document Phase 5 features and upgrade migration
- Admin credential change (Settings button in topbar)
- User rename (usermod -l, password reset required after)
- PBKDF2 hashing detail in Auth section
- Upgrade migration steps for /etc/micronas/ path change
- Fix dev/test snippet to use MICRONAS_PASS_HASH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:53:20 +02:00
marcandClaude Sonnet 4.6 7194aaf7e9 Move config files to /etc/micronas/, fix WebDAV passwd permissions
- /etc/micronas.env      → /etc/micronas/micronas.env
- /etc/micronas-webdav.passwd → /etc/micronas/webdav.passwd
- _save_credentials creates /etc/micronas/ if missing
- _write_webdav_conf: chown root:www-data on passwd file so Apache can read it
- micronas.service EnvironmentFile updated
- README: credentials now set via /setup, config dir step added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:48:02 +02:00
marcandClaude Sonnet 4.6 9db51ca927 Add WebDAV settings reference to README
Documents allowed users, password sync, www-data folder permissions,
and the no-toggle limitation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 09:18:36 +02:00
marcandClaude Sonnet 4.6 7c9fe07a17 Add WebDAV support via Apache mod_dav
Backend:
- WebDAV config managed at /etc/apache2/conf-available/micronas-webdav.conf
  with BEGIN/END markers per share; reload apache2 on every write
- htpasswd file at /etc/micronas-webdav.passwd synced automatically on
  create_user, change_password, delete_user
- Full CRUD: POST/PATCH/DELETE /api/share/webdav[/<name>]
- _validate_webdav_users(): space-separated, no @group (not supported by Apache)
- Fix: _validate_users() now allows @groupname for SMB (was incorrectly rejected)
- Dashboard: apache2 status + restart button; webdav shares in /api/dashboard

Frontend:
- WebDAV tab: create form + table with clickable access URLs
- Edit modal supports 'webdav' type (name, path, users, permissions section)
- badge-webdav CSS class (green tint) in app.css
- dashboard.js renders badge-<type> dynamically (smb/nfs/webdav)

Docs: README WebDAV mount guide (Linux davfs2, Windows, Mac), PLANNING phase 4

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 01:22:19 +02:00
marcandClaude Sonnet 4.6 1be6a05cef Add dashboard IPs/restart/connections, SMB read-only and recycle bin
Dashboard:
- Server IPs card showing all non-loopback IPv4 interfaces
- Restart buttons next to smbd/nfsd status dots (POST /api/service/<name>/restart)
- Active SMB connections table (smbstatus -b parsed in backend)

SMB edit modal:
- Read only toggle (writable vs read only in smb.conf)
- Recycle Bin toggle (vfs objects = recycle, files go to .recycle folder)

Docs: PLANNING.md phase 3.5, README recycle bin + read-only, CLAUDE.md JS overview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 01:13:32 +02:00
marcandClaude Sonnet 4.6 1810d60d21 Document SMB/NFS share settings in README
Explains valid users, folder permissions, force user/group, guest ok,
no_root_squash, all_squash with use cases and recipes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 01:00:02 +02:00
marcandClaude Sonnet 4.6 e03905b26d README: add Linux client mount guide for SMB and NFS
Covers one-time and permanent (fstab) mounts for both protocols,
credentials file for SMB, _netdev flag, multi-network NFS clients,
and useful commands (showmount, umount, mount -a).
Also remove stale "quotas" from the project description line.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 23:55:50 +02:00
marcandClaude Sonnet 4.6 96055e6375 Codebase cleanup: remove dead code, fix docker, update docs
app.py:
- Remove 'raw' field from export dict entries (only comment/blank
  kinds need raw; export entries are always reconstructed from
  path/rest/enabled when writing back)
- Remove extra blank line

shares.js:
- Remove unused pathJson variable in SMB row (was only needed for
  the quota button, which was removed)

docker-compose.yml:
- Deleted entirely: was missing templates/ and static/ mounts so the
  Flask app couldn't serve pages; SYS_ADMIN cap_add was only needed
  for quotas; deployment is systemd, not Docker

README.md:
- Remove quota package from apt install command
- Remove quota setup section (feature removed)
- Remove docker-compose from Dev section

CLAUDE.md / PLANNING.md:
- Remove docker-compose.yml references and quotas.js from file tree

.gitignore:
- Remove redundant micronas.env entry (already covered by *.env)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 23:11:41 +02:00
marcandClaude Sonnet 4.6 f4943b6b6d Add refresh countdown, fix quota fs lookup, update README
- main.js: show live countdown "Updated HH:MM:SS — next in Xs" so the
  30s auto-refresh is visually obvious instead of just a static timestamp
- app.py: rename _find_mountpoint → _find_quota_fs and fix the stale
  call site that caused a NameError; function now returns mountpoint from
  df, falling back to the path itself if df returns /
- README: add full quota setup section (fstab usrquota, quotacheck,
  quotaon, verify with repquota); fix stale "127.0.0.1" bind note
  (service already uses 0.0.0.0); update Auth section (sessions, not
  Basic Auth)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 22:38:42 +02:00
marcandClaude Sonnet 4.6 4d697c7ca4 Fix README git clone URL to use Gitea
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 22:00:48 +02:00
marcandClaude Sonnet 4.6 458092a3c6 Add Phase 2 dashboard + fix Phase 1 issues
- Implement parse_smb(), remove shell=True, add input validation, HTTP Basic Auth (Phase 1)
- Add /api/dashboard with daemon status, disk usage, per-share du, quota usage (Phase 2)
- Rewrite index.html with Dashboard as landing tab, progress bars, XSS-safe rendering
- Update README with full LXC install guide including git clone and update steps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 21:58:47 +02:00
Honey 10a1e24420 Rename project to MicroNAS 2026-06-19 21:06:15 +02:00
Honey f2aca2e3ea Initial commit: MicroNAS share manager (Phase 1) 2026-06-19 21:02:46 +02:00