fauria / docker-vsftpd

🐳 vsftpd Docker image based on Centos 7. Supports passive mode and virtual users.
https://hub.docker.com/r/fauria/vsftpd/
Apache License 2.0
418 stars 343 forks source link

No files available #68

Open Bence98007 opened 2 years ago

Bence98007 commented 2 years ago

Hi there! Thanks for the effort creating a lightweight ftp docker image!

I just missing something, maybe permission issues? So I created a compose file, which is the following:

version: '3.3'
services:
    vsftpd:
        volumes:
            - /var/containersdata/ftp-srv/data:/home/vsftpd
            - /var/containersdata/ftp-srv/log:/var/log/vsftpd
        ports:
            - '20:20'
            - '21:21'
            - '21100-21110:21100-21110'
        environment:
            - FTP_USER=user
            - FTP_PASS=pass
            - PASV_MIN_PORT=21100
            - PASV_MAX_PORT=21110
            - LOCAL_UMASK=0777
        container_name: ftp-srv
        restart: always
        image: fauria/vsftpd

But as I connect to the FTP server from my network (so no firewall etc) the connection is up, but I can see no files there. I tried to create a symlink to the ftp-shared folder, and also just a txt file, but no success, nothing is shown in my ftp server. What am I doing wrong?

Bence98007 commented 2 years ago

Nvm, I was a bit confused where should I map the volume. Looks like I need to map it to /home/vsftpd/user, not to /home/vsftpd. How can I use symlinks? Is it possible that it will work, or the ftp is not capable of this? Thanks!!

alainseys commented 2 years ago

Hi, @Bence98007

Symbolic links are a bit tricky on docker what i tent to use is mount the required files as a volume depende on the needs for example

` volumes:

`

You can also try to add the symlink in the dockerfile with the traditional RUN command but i tend to use volumes over a sym link.

In you use case i belive you want the shared folder to your local machine correct?