Hello,
This looks perfect for what I need.
My docker run:
docker run \
--name paperless-ftp \
-e ROOT_DIR=/ftp \
-e AUTH_TYPE=json \
-e AUTH_JSON_PATH=/credentials.json \
-e UNFTP_PASSIVE_PORTS=50000-50005 \
-p 2121:2121 \
-p 50000:50000 \
-p 50001:50001 \
-p 50002:50002 \
-p 50003:50003 \
-p 50004:50004 \
-p 50005:50005 \
-p 8080:8080 \
-v /home/michael/docker/paperless/paperless-ngx/credentials.json:/credentials.json \
-v /home/michael/docker/paperless/paperless-ngx/consume:/ftp \
-ti \
bolcom/unftp:v0.14.2-alpine
I created a credentials.json file:
[
{
"username": "scan",
"password": "REDACTED"
}
]
This works - I can read it from inside the container and the ftp and the log contains:
Dec 06 01:42:56.282 INFO PASS: User User(username: "scan", name: None, surname: None) logged in
First question:
If I exec in and run touch /ftp/test I get this:
$ ls -l /home/michael/docker/paperless/paperless-ngx/consume
total 0
-rw-r--r-- 1 1010 1010 0 Dec 5 17:57 test
-rw-rw-r-- 1 michael michael 0 Dec 5 17:34 this_is_a_test.mkv
Is there anyway to set the uid/gid to 1000?
Second question:
$ docker ps | grep ftp
00c7917fb8a8 bolcom/unftp:v0.14.2-alpine "/unftp/unftp -vv" 21 minutes ago Up 21 minutes 0.0.0.0:2121->2121/tcp, :::2121->2121/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:50000-50005->50000-50005/tcp, :::50000-50005->50000-50005/tcp paperless-ftp
from the log:
Dec 06 01:57:21.667 INFO Listening on passive port 172.17.0.2:50000
from lftp:
$ ftp 192.168.192.103 2121 ✹ ✭master
Connected to 192.168.192.103.
220 Welcome to unFTP
Name (192.168.192.103:michael): scan
331 Password Required
Password:
230 User logged in, proceed
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (172,17,0,2,195,81)
Passive mode address mismatch.
ftp> exit
221 Bye!
I believe it's translating between the docker IP and the LAN IP. While dockers 0.0.0.0:2121->2121/tcp binds to all IPs, it appears unftp only wants the docker IP.
If I locally test it with the docker IP:
ftp> ls -l
227 Entering Passive Mode (172,17,0,2,195,81)
150 Sending directory list
226 Listed the directory
ftp> ls
227 Entering Passive Mode (172,17,0,2,195,83)
150 Sending directory list
226 Listed the directory
apparently more permission problems...
$ docker exec -it paperless-ftp ls -l /ftp
total 0
-rw-r--r-- 1 unftp unftp 0 Dec 6 01:57 test
-rw-rw-r-- 1 1000 1000 0 Dec 6 01:34 this_is_a_test.mkv
Hello,
This looks perfect for what I need.
My docker run:
I created a
credentials.jsonfile:This works - I can read it from inside the container and the ftp and the log contains:
First question:
If I exec in and run
touch /ftp/testI get this:Is there anyway to set the uid/gid to 1000?
Second question:
from the log:
from lftp:
I believe it's translating between the docker IP and the LAN IP. While dockers
0.0.0.0:2121->2121/tcpbinds to all IPs, it appears unftp only wants the docker IP.If I locally test it with the docker IP:
apparently more permission problems...