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
414 stars 341 forks source link

Issues with group and user id #79

Closed AJConnelly closed 1 year ago

AJConnelly commented 1 year ago

I see that in the dockerfile the userid and groupid are set to 14 and 50 however to get this to work with another container (paperless-ngx) and so that my user can access the directory I would need to set the group and user id to 1000. I also see this is set if I were building the image from the repo with docker-compose.yml but an image pull would be prefered.

services:
    vsftpd:
      image: fauria/vsftpd
      container_name: vsftpd
      environment:
        - FTP_USER=austinpaperless
        - FTP_PASS=******
        - PASV_ADDRESS=192.168.1.69
        - PASV_MIN_PORT=21100
        - PASV_MAX_PORT=21110
        - LOCAL_UMASK=0777
        - FILE_OPEN_MODE=0777
      ports:
        - 0.0.0.0:20:20
        - 0.0.0.0:21:21
        - "21100-21110:21100-21110"
      volumes: 
        - /home/austin/ftpserver/:/home/vsftpd
        - /home/austin/docker/vsftpd/:/var/log/vsftpd
      restart: always
AJConnelly commented 1 year ago

I have managed to work around the other docker container (paperlessngx) running with uid and guid of 1000 by chmoding the ftp/user directory to 757 so that other users can access the directory. The other issue I'm running into now is that the env variables FILE_OPEN_MODE: 0777 doesn't seem to be working as expected. When adding files through filezilla they are not given the expected permissions of -rwxrwxrwx, instead the files are set to ----------

AJConnelly commented 1 year ago

Issue was a misunderstanding of what I though umask was. Been a while since unix courses. umask subtracts the permissions rather than adding them so thats why I was getting 0 permissions on files. Since changing umash to 022 now i get the desired file permissions