Issue:
FTP access for specific cPanel accounts needs to be disabled. There is no native way in cPanel/WHM to achieve this.
Solution :
Assuming that you are using pure-ftpd, go to /usr/sbin/pureauth . There would be a section in the code as follows :
# Create ftpusers array
if ( -e ‘/etc/ftpusers’ && !-z ‘/etc/ftpusers’ ) {
open my $ftpusers_fh, ‘<‘, ‘/etc/ftpusers’;
my @ftpusers = <$ftpusers_fh>;
close $ftpusers_fh;
@ftpusers = grep { s/[rns]//g } @ftpusers;# disallow accounts in ftpusers
if ( any( sub { lc($acctowner) eq lc($_) }, @ftpusers ) ) {
failed_auth();
}
}
All you need to do is create a file as /etc/ftpusers and put the cPanel usernames in it.
FTP access will no longer be available to the cPanel accounts corresponding to these usernames.
Others would be able to login!
Check out some more blogs here:-
How Can IT Managed Services Help Your Start-up Grow in 2017
How Cloud Consultants can help you save your Time and Money
Reasons Why Startups should Use Public Cloud Solutions
InstaCarma is reckoned as one of the most reliable names in the industry owing to their years of experience and domain expertise at providing tech support to its wide ranged hosting and data centers clientele. Contact us to know more.