feat: fix permissions + add SSH key for Windows clients #3

Merged
MangoPig merged 2 commits from opencode-agent/JingTian-Rclone:feature/fix-permissions-add-key into main 2026-02-13 11:01:20 +01:00
Member

Summary

This PR fixes the Ubuntu setup script permission handling and adds the SSH key for Windows clients.

Changes

Ubuntu Setup Script (ubuntu/setup.sh)

  • Reordered operations: Create rclone-sync user FIRST, then create directories
  • Fixed permission inheritance: Use chown -R to handle pre-existing directories (e.g., when repo is cloned before running setup)
  • Added ownership verification: Shows directory ownership after creation
  • Added PUBLIC_IP argument: Can pass public IP as argument, otherwise auto-detects via ifconfig.me

New File: SSH Key (windows/rclone-key)

  • Private key generated by the Ubuntu setup script
  • Used by Windows clients to authenticate via SFTP
  • Stored in private repo (acceptable for demo)

Testing Done

  1. Cleaned Ubuntu VM
  2. Created /data/jingtian/BenjaminTeam/_LLM_Sync/code as mangopig user
  3. Cloned repo (directories owned by mangopig)
  4. Ran setup script
  5. Verified all directories correctly owned by rclone-sync
  6. Tested SSH connection with generated key - SUCCESS

Connection Details

Host: 20.240.140.78
User: rclone-sync
Path: /data/jingtian/BenjaminTeam
## Summary This PR fixes the Ubuntu setup script permission handling and adds the SSH key for Windows clients. ## Changes ### Ubuntu Setup Script (`ubuntu/setup.sh`) - **Reordered operations:** Create `rclone-sync` user FIRST, then create directories - **Fixed permission inheritance:** Use `chown -R` to handle pre-existing directories (e.g., when repo is cloned before running setup) - **Added ownership verification:** Shows directory ownership after creation - **Added PUBLIC_IP argument:** Can pass public IP as argument, otherwise auto-detects via `ifconfig.me` ### New File: SSH Key (`windows/rclone-key`) - Private key generated by the Ubuntu setup script - Used by Windows clients to authenticate via SFTP - Stored in private repo (acceptable for demo) ## Testing Done 1. Cleaned Ubuntu VM 2. Created `/data/jingtian/BenjaminTeam/_LLM_Sync/code` as `mangopig` user 3. Cloned repo (directories owned by `mangopig`) 4. Ran setup script 5. Verified all directories correctly owned by `rclone-sync` 6. Tested SSH connection with generated key - **SUCCESS** ## Connection Details ``` Host: 20.240.140.78 User: rclone-sync Path: /data/jingtian/BenjaminTeam ```
opencode-agent added 2 commits 2026-02-13 11:00:58 +01:00
- Create rclone-sync user BEFORE creating directories
- Use chown -R to handle pre-existing directories from repo clone
- Add ownership verification output
- Support optional PUBLIC_IP argument for connection details
This key is generated by the Ubuntu setup script and allows
Windows clients to authenticate via SFTP to the sync server.
MangoPig merged commit 1101f188e8 into main 2026-02-13 11:01:20 +01:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Goko/JingTian-Rclone#3