Symptoms
- Attempting to create a new FTP account in cPanel returns an error indicating the maximum FTP account limit has been reached:
CPANEL_ERROR: You have already used your maximum allotment (10) of FTP accounts.
- Running
wc -l /etc/proftpd/usernamereturns a higher count thanuapi --user=username Ftp list_ftp.
Cause
The file /etc/proftpd/username contains orphaned entries for FTP accounts that were associated with addon domains no longer on the account. These stale entries cause cPanel to count more FTP accounts than are actively in use, triggering the maximum limit error even when the actual number of accounts is below the limit. This commonly occurs when an account has been migrated from another server.
Resolution
Note: Replace username with the cPanel account username in the following commands.
- Log in to the server via SSH or WHM's Terminal as the
rootuser. Confirm the discrepancy between the
/etc/proftpd/usernamefile count and the UAPI count:# wc -l /etc/proftpd/username
# uapi --user=username Ftp list_ftp | grep user | cut -d":" -f2 | wc -l
If the first number is higher than the second, orphaned entries are present.
Identify the orphaned entries by comparing the file contents to the UAPI output:
# cut -d":" -f1 /etc/proftpd/username
# uapi --user=username Ftp list_ftp | grep user | cut -d":" -f2
Back up the file before editing:
# cp -v /etc/proftpd/username /root/username.bak
- Open
/etc/proftpd/usernameand remove each line belonging to an orphaned account identified in step 3. Confirm the counts now match:
# wc -l /etc/proftpd/username
# uapi --user=username Ftp list_ftp | grep user | cut -d":" -f2 | wc -l
Comments
0 comments
Article is closed for comments.