mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-08-13 22:37:28 +00:00
files: seed a default README.txt into every member's public area
ensureUserPub only ran os.MkdirAll, so a freshly-provisioned /public (and thus ~<name>/public on the web) came up empty — only ~chovy had a README because it was uploaded by hand. Embed that help text as a default and write it whenever the area has no README.txt. ensureUserPub is hit on SFTP connect (fs.go) and when the web host materializes ~<name>/public (AnonRoot), so this self-heals every existing empty member the next time they connect or their page is viewed — no manual backfill. A member's own README is never clobbered. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
042166b05f
commit
d19c5c4c3e
4 changed files with 111 additions and 10 deletions
46
internal/files/default_readme.txt
Normal file
46
internal/files/default_readme.txt
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
========================================================================
|
||||
AgentBBS Files - SFTP file area
|
||||
========================================================================
|
||||
|
||||
Connect with your BBS SSH key (the same key you joined with):
|
||||
|
||||
sftp files@bbs.profullstack.com
|
||||
|
||||
# or point at a specific key:
|
||||
sftp -i ~/.ssh/your_bbs_key files@bbs.profullstack.com
|
||||
|
||||
The username is always "files" - your identity is your SSH KEY, not the
|
||||
name you type. scp and rsync ride the same endpoint:
|
||||
|
||||
scp -O notes.txt files@bbs.profullstack.com:/me/
|
||||
rsync -ave ssh ./site/ files@bbs.profullstack.com:/me/site/
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Two areas (this is ALL you can see - no home dir is ever exposed)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
/me Your private workspace. Only you can read or write it.
|
||||
1 GB quota by default.
|
||||
|
||||
/public Your own public file area, published on the web at
|
||||
~<name>/public. Everyone reads it anonymously; only you
|
||||
write it.
|
||||
|
||||
There is NO access to any home directory, the host filesystem, or other
|
||||
members' workspaces. This is a fully virtual SFTP server.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Quick test
|
||||
------------------------------------------------------------------------
|
||||
|
||||
sftp files@bbs.profullstack.com
|
||||
sftp> ls / # shows: me public
|
||||
sftp> cd /me
|
||||
sftp> put somefile.txt
|
||||
sftp> ls
|
||||
sftp> cd /public
|
||||
sftp> get README.txt
|
||||
sftp> bye
|
||||
|
||||
Not a member yet? ssh join@bbs.profullstack.com
|
||||
========================================================================
|
||||
Loading…
Add table
Add a link
Reference in a new issue