coder / sshcode

Run VS Code on any server over SSH.
MIT License
5.74k stars 216 forks source link

rsync error, failed to sync settings on ec2 #168

Closed puneethrj closed 4 years ago

puneethrj commented 4 years ago

Not able to run sshcode on aws ec2 ran with ./sshcode user@ip --ssh-flags="-i awspemfile.pem"

rsync: chgrp "/home/user/.local/share/code-server/User/." failed: Operation not permitted (1)
rsync: delete_file: unlink(state/global.json) failed: Permission denied (13)
rsync: delete_file: unlink(state/empty-window.json) failed: Permission denied (13)
rsync: delete_file: unlink(state/4e84e5a9.json) failed: Permission denied (13)
rsync: delete_file: unlink(state/39fc37c4.json) failed: Permission denied (13)
rsync: delete_file: unlink(state/25a516f6.json) failed: Permission denied (13)
rsync: delete_file: unlink(state/-588dcddf.json) failed: Permission denied (13)
cannot delete non-empty directory: state
./
rsync: recv_generator: mkdir "/home/user/.local/share/code-server/User/globalStorage" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync: chgrp "/home/user/.local/share/code-server/User/snippets" failed: Operation not permitted (1)
globalStorage/
snippets/

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
2020-03-08 02:55:08 FATAL   error: failed to sync settings: failed to rsync '/home/user/.config/Code/User/' to 'user@ip :~/.local/share/code-server/User/': exit status 23
Merith-TK commented 4 years ago

can you put that all in a code block please?

Like so?

use three ` to wrap it

And please verify that the user you have, has access to those folders on both machines and have FULLY access and ownership, as it looks like rsync is erroring out as it is trying to change permissions to match your users permissions and cant due to linux permission bullarky

puneethrj commented 4 years ago

Can you discuss the appropriate permissions required?

Merith-TK commented 4 years ago

read/write permissions at the very least, and ownership of the files/folders, —Merith

On Mon, Mar 9, 2020 at 9:51 AM puneethrj notifications@github.com wrote:

Can you discuss the appropriate permissions required?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cdr/sshcode/issues/168?email_source=notifications&email_token=ACPQOXUGO2SD4ZVNBXR4WA3RGUNA3A5CNFSM4LDTRPG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOIB5VY#issuecomment-596647639, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPQOXVUYSDZ2RRXOA6MBGTRGUNA3ANCNFSM4LDTRPGQ .

puneethrj commented 4 years ago

running: sudo chown <user> -R "$HOME/.local/share/code-server/" at the remote server worked Thank you

Merith-TK commented 4 years ago

Yeah i noticed that it was a permissions issue due to the errors, try doing those commands t (moving, changing permissions) on files your user doesnt own (as an example) without sudo and it would return errors akin to it

You can close the issue if you like,