Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add with-peruserlimits #7

Merged
merged 3 commits into from
Aug 29, 2024
Merged

add with-peruserlimits #7

merged 3 commits into from
Aug 29, 2024

Conversation

matthewh86
Copy link
Contributor

@matthewh86 matthewh86 commented Aug 28, 2024

hi, thanks for the base image!

this separates out the configuration from the image's /etc and /var locations to allow for simpler volume mounting (e.g. for persisting configuration and user accounts). removed as discussed

this adds with-peruserlimits to support the PER_USER_LIMITS property that is useful for allowing more than 20 anonymous connections

Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthewh86 thanks for the PR!

I'm not against --withperuserlimits and --localstatedir=/var/pure-ftpd.

However, I would like not to change --sysconfdir=/etc/pure-ftpd since it would break existing installations using default paths quite hard. You still can mount anything in one dir just by specifying custom paths as described in README.

Also, I wonder: why would you want to mount /var/pure-ftpd? Judging from default installations, it only writes /var/run/pure-ftpd.pid, since /var/log/ is written to syslog. What would be the case to preserve .pid file between container restarts?

@matthewh86
Copy link
Contributor Author

matthewh86 commented Aug 28, 2024

--sysconfdir=/etc/pure-ftpd - I'll revert and just add config to my dependant image. Thanks for the PURE_PASSWDFILE and PURE_DBFILE config options!

Regarding the pid question for --localstatedir=/var/pure-ftpd, I have no real answer to thas, so I can just revert it.

@matthewh86 matthewh86 changed the title set sysconfdir and localstatedir, add with-peruserlimits add with-peruserlimits Aug 28, 2024
@matthewh86
Copy link
Contributor Author

matthewh86 commented Aug 28, 2024

In case you were interested, here's the docker image I spent way too long fighting with to get to state where I'm mostly happy with how it functions.

https://github.com/noxtech/anonymous-pure-ftp

  • Anonymous user support
  • Virtual "standard" user support
  • Virtual "super" user support

Things which gave me a headache were how docker mounts volumes, screws with the file/directory permissions and ownership, and various other quirks that I've forgotten about.

Here's the docker-compose.yml entry:

  ftp:
    image: noxtech/anonymous-pure-ftp
    container_name: gameserver-ftp
    environment:
      - FTP_PASSIVE_PORTS=40000 40039
    ports:
      - "21:21"
      - "40000-40039:40000-40039"
    restart: unless-stopped
    volumes:
      - "/srv/store/docker-volumes/ftp/data:/data"
      - "/srv/store/docker-volumes/ftp/etc/pure-ftpd/:/etc/pure-ftpd/"

@tyranron
Copy link
Member

tyranron commented Aug 29, 2024

Things which gave me a headache were how docker mounts volumes, screws with the file/directory permissions and ownership, and various other quirks that I've forgotten about.

Yeah... it's better on Kubernetes. But Docker Compose may give some headache here.

Nevertheless, the image comes with s6-overlay system included, so everything you've done in your Docker image could be just a mounted s6 startup script without a need for the derivated image. However, given the circumstances, it may be not so pleasant to deploy (again, in Kubernetes it's quite easy).

@tyranron tyranron merged commit 4ce260c into instrumentisto:main Aug 29, 2024
4 checks passed
@tyranron
Copy link
Member

Released as 1.0.51-r28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants