Subcommand 'fetch' supports using flag '-s/--run.sudo' to copy files and directories to which the user does not have access permission.
Closed this issue · 0 comments
windvalley commented
For example:
# Use sudo as root to copy no permission files.
$ gossh fetch host1 -f /root/foo.txt -d ./backup/ -s
# Use sudo as 'zhangsan' to copy no permission files.
$ gossh fetch host1 -f /home/zhangsan/foo.txt -d ./backup -s -U zhangsan