Skip to content

Fix to retire ProFTPD virtual FTP feature#1213

Open
iliaross wants to merge 5 commits into
masterfrom
dev/drop-virtual-ftp
Open

Fix to retire ProFTPD virtual FTP feature#1213
iliaross wants to merge 5 commits into
masterfrom
dev/drop-virtual-ftp

Conversation

@iliaross
Copy link
Copy Markdown
Member

@iliaross iliaross commented May 8, 2026

Hello, Jamie!

As you asked, creating a PR for this change so we can discuss it.

In particular, this change breaks other FTP-related features such as chroot directories, which we do want to preserve.

Thanks, I’ll take a look soon! I just want to finish something first.

@iliaross
Copy link
Copy Markdown
Member Author

iliaross commented May 8, 2026

In particular, this change breaks other FTP-related features such as chroot directories, which we do want to preserve.

Thanks, I’ll take a look soon! I just want to finish something first.

Jamie, please see this patch 0e336da.

Comment thread copycert-lib.pl Outdated
Comment thread backup-domain.pl Outdated
@jcameron
Copy link
Copy Markdown
Collaborator

So is the goal here to remove FTP support entirely, or just the virtual FTP feature? Because I see PR is deleting things like the ability to stop and start the FTP server, which I think we should keep. Also support for chroot'd FTP.

@iliaross
Copy link
Copy Markdown
Member Author

Because I see PR is deleting things like the ability to stop and start the FTP server, which I think we should keep. Also support for chroot'd FTP.

You're right! Sorry about that! The fix is here e79471f.

@github-actions
Copy link
Copy Markdown

Code review failed

Repository: virtualmin/virtualmin-gpl
Commit: e79471fd0

The virtual FTP removal mostly updates feature lists and callers, but the now-unconditional chroot backup entry can break Virtualmin backups when ProFTPd is not available.

Fatal Attention
1 0

Commit | Reviewed diff | Patch | GitHub run

Findings

  • [fatal] virtual-server-lib.pl:185 - chroot is now always included in @virtualmin_backups, but virtualmin_backup_chroot returns 0 when ProFTPd chroot support is unavailable; because the restore path treats this unsupported case as success, the backup path is likely to mark Virtualmin configuration backups as failed on systems without ProFTPd. Suggested fix: Either keep chroot conditional on has_ftp_chroot()/ProFTPd support, or make virtualmin_backup_chroot return success when it intentionally skips because ProFTPd chroot support is unavailable.

Reviewed

  • Removal of the retired virtual FTP feature and related feature lists
  • ProFTPd helper loading and chroot backup/restore handling
  • CLI feature validation changes for backup and restore commands

Passed checks

  • Feature validation now checks core feature membership before accepting enabled config keys, which avoids accepting stale removed feature settings.
  • The deleted per-domain FTP log option in get-logs.pl is rejected explicitly instead of silently selecting an unsupported log type.

@iliaross
Copy link
Copy Markdown
Member Author

Because I see PR is deleting things like the ability to stop and start the FTP server, which I think we should keep. Also support for chroot'd FTP.

You're right! Sorry about that! The fix is here e79471f.

Jamie, code review is wrong, right?

The virtual FTP removal mostly updates feature lists and callers, but the now-unconditional chroot backup entry can break Virtualmin backups when ProFTPd is not available.

Comment thread backup-domain.pl
local $f = shift(@ARGV);
$f eq "virtualmin" || $config{$f} ||
$f eq "virtualmin" ||
(&indexof($f, @features) >= 0 && $config{$f}) ||
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could remove the need for this extra check of @features by just removing ftp from the module config in postinstall.pl

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could remove the need for this extra check of @features by just removing ftp from the module config in postinstall.pl

Probably better to keep the check here so we don’t break anything on existing systems?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But that wouldn't be possible if we removed ftp=1 from /etc/webmin/virtual-server/config at upgrade time.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Or alternately, create a common function like is_enabled_feature and move the current logic there.

@jcameron
Copy link
Copy Markdown
Collaborator

Yeah I don't get what that code review is thinking, sorry. The change seems pretty much OK to me, except for one comment I added.

@iliaross
Copy link
Copy Markdown
Member Author

Yeah I don't get what that code review is thinking, sorry. The change seems pretty much OK to me, except for one comment I added.

There was a bug back then in the code review code for PRs that should be fixed now. Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants