Difference between revisions of "Sftpgo"
Jump to navigation
Jump to search
Line 33: | Line 33: | ||
apiurl="http://127.0.0.1:8080/api/v2" | apiurl="http://127.0.0.1:8080/api/v2" | ||
curl -H 'Accept: application/json' -H "Authorization: Bearer ${token}" ${apiurl}/users | curl -H 'Accept: application/json' -H "Authorization: Bearer ${token}" ${apiurl}/users | ||
+ | ``` | ||
+ | |||
+ | # Webdav | ||
+ | |||
+ | ``` | ||
+ | curl --user 'myuser:myuserpass' -X MKCOL 'http://host/buskfoo' --basic | ||
+ | curl --user 'myuser:myuserpass' -T '/tmp/file.txt' 'http://host/buskfoo' --anyauth # --basic or --digest | ||
``` | ``` |
Revision as of 07:05, 6 March 2021
https://github.com/drakkan/sftpgo
This is an excellent project. Please use it and donate to it with time or $$$.
Bash Examples
/app/sftpgo/up
for dir in /app/sftpgo/data /app/sftpgo/home /app/sftpgo/share; do mkdir -p $dir done docker run --name sftpgo \ -p 0.0.0.0:8080:8090 \ -p 2022:2022 \ --mount type=bind,source=/app/sftpgo/data,target=/srv/sftpgo \ --mount type=bind,source=/app/sftpgo/home,target=/var/lib/sftpgo \ --mount type=bind,source=/app/sftpgo/share,target=/share \ -e SFTPGO_HTTPD__BINDINGS__0__PORT=8090 \ -d "drakkan/sftpgo:latest"
/app/sftpgo/down
docker stop sftpgo docker rm -f sftpgo
/app/sftpgo/apigetusers
rsp=$(curl -s http://admin:password@sftp.example.io:8080/api/v2/token) token=$(echo $rsp | jq -r '.access_token') apiurl="http://127.0.0.1:8080/api/v2" curl -H 'Accept: application/json' -H "Authorization: Bearer ${token}" ${apiurl}/users
Webdav
curl --user 'myuser:myuserpass' -X MKCOL 'http://host/buskfoo' --basic curl --user 'myuser:myuserpass' -T '/tmp/file.txt' 'http://host/buskfoo' --anyauth # --basic or --digest