panubo / docker-vsftpd Goto Github PK
View Code? Open in Web Editor NEWvsftpd Docker Image
Home Page: https://hub.docker.com/r/panubo/vsftpd/
License: MIT License
vsftpd Docker Image
Home Page: https://hub.docker.com/r/panubo/vsftpd/
License: MIT License
Can not understand how variables look to multiple users?
For one
-e FTP_USER=user1
-e FTP_PASSWORD=password1
-v '/backups:/srv/'
FTP_USER_* ?
FTP_USER_user1= ? what?
In line 18 https://github.com/panubo/docker-vsftpd/blob/master/entry.sh#L18 ${!user}
is unquoted.
IFS=: read name pass <<< ${!user}
I was unable to add multiple users until I changed it to
IFS=: read name pass <<< "${!user}"
Consider this simple demo
$ export FTP_USER_UNO='one:111'
$ export FTP_USER_DOS='two:222'
$ while read user; do
> IFS=':' read name pass <<< ${!user}
> echo "Adding user $name"
> echo "($pass)"
> done < <(env | grep "FTP_USER_" | sed 's/^\(FTP_USER_[a-zA-Z0-9]*\)=.*/\1/')
Adding user two 222
()
Adding user one 111
()
$ while read user; do
> IFS=':' read name pass <<< "${!user}"
> echo "Adding user $name"
> echo "($pass)"
> done < <(env | grep "FTP_USER_" | sed 's/^\(FTP_USER_[a-zA-Z0-9]*\)=.*/\1/')
Adding user two
(222)
Adding user one
(111)
Hi,
Can you add linux/arm64 docker image?
I'm running you container and try to send files using curl
but it fails.
export FTP_USER="test"
export FTP_PASSWORD="test"
docker run \
--name mock_ftp_server \
--publish 21:21 \
--publish 4559-4564:4559-4564 \
--env FTP_USER="$FTP_USER" \
--env FTP_PASSWORD="$FTP_PASSWORD" \
--detach \
panubo/vsftpd
$ curl --upload-file /tmp/mock.data-2017-03-28.tar.gz ftp://localhost --user $FTP_USER:$FTP_PASSWORD
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (25) Failed FTP upload: 553
What's the matter here? Do I need to add something?
How on uploaded files via FTP are set to 644 permissions and user:group 48:48
In need of a pre-created structure i.e:
/srv/downloads
/srv/uploads
I tried to generate a image:
FROM panubo/vsftpd
VOLUME /srv/downloads
VOLUME /srv/uploads
But on entry.sh
the ownership is only aplied to srv
, blocking access of ftp user on subdirectories.
Hi,
I have an error when use FTP_USER_*
enviroment:
- FTP_USER_*="miuser:$5$qz.bnOSeN0vMmAHv$Byhznun5H4bHTGCoeYwQWFX6Lov6iYL3Ft26fkhLFaSYbTFFEfdgEH7NjA53MVhZlIzrtK8a66cX94ixyx683/"
ERROR: Invalid interpolation format for "environment" option in service "ftpd": "FTP_USER_*="miuser:$5$qz.bnOSeN0vMmAHv$Byhznun5H4bHTGCoeYwQWFX6Lov6iYL3Ft26fkhLFaSYbTFFEfdgEH7NjA53MVhZlIzrtK8a66cX94ixyx683/""
The default /src directory has the owner root with group root, and permisson 755, thus preventing vsftpd to write to the directory.
The issue could be resolved by the following solution: the directory should be owned by the user of the vsftpd, named 'ftp'.
What do you think, is there any problem with this solution?
Currently the virtual ftp user gid and uid is hard coded in the Dockerfile to 48:48.
This should be configurable so you can use what ever uid or gid you like (except maybe root 0:0).
I see two options
Hello,
Can you add the following lines to the entry.sh file to be able to change the ID and GID of the ftp user?
groupmod -g ${FTP_GID} ftp
usermod -u ${FTP_UID} -g ${FTP_GID} ftp
With kind regards.
Julien.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.