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

Closed
opencode-agent wants to merge 2 commits from (deleted):feature/fix-permissions-add-key into main
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 10:55:56 +01:00
This key is generated by the Ubuntu setup script and allows
Windows clients to authenticate via SFTP to the sync server.
- 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
opencode-agent closed this pull request 2026-02-13 10:59:08 +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#2