Software⏱️ 4 min read📅 2026-06-15

How to Fix: SFTP error - User does not have any roots specified

SFTP error fix for users without roots specified

Quick Answer: Check if the user has a valid SSH key or root password, and ensure it's correctly configured in the SFTP site settings.

The error 'User does not have any roots specified; the channel is being closed' occurs when an SFTP user attempts to log in without specifying their root user. This can be frustrating for users who are accustomed to having a default or inherited root user, as it prevents them from accessing certain features or performing specific tasks. In this troubleshooting guide, we will explore possible causes and provide solutions for resolving this issue.

Resolving the 'User does not have any roots specified' error can be challenging, especially if you are not familiar with SFTP configuration or user management. However, by following the steps outlined in this guide, you should be able to identify and fix the problem, allowing your users to access their SFTP site without any issues.

🛑 Root Causes of the Error

  • The primary cause of this error is that the SFTP server requires the user to specify their root user when logging in. This is a security measure designed to prevent unauthorized access to the system. When a user does not provide a valid root user, the server closes the channel and displays an error message.
  • An alternative cause could be that the user's SSH configuration file (usually located at ~/.ssh/config) contains incorrect or missing settings for the root user. In this case, the SFTP server may not be able to determine which root user to use, resulting in the 'User does not have any roots specified' error.

🛠️ Step-by-Step Verified Fixes

Specify the Root User in the SSH Configuration File

  1. Step 1: Open your user's SSH configuration file in a text editor. The location of this file may vary depending on your operating system and SFTP server software. On Ubuntu/Debian systems, it is usually located at ~/.ssh/config.
  2. Step 2: Locate the 'User' directive within the configuration file. This should be followed by the root user's username (e.g., 'root'). If no 'User' directive exists, add one with the correct root user's username.
  3. Step 3: Save and close the configuration file. Then, try logging in to the SFTP site again using the updated SSH configuration.

Use an Inherited Root User (if applicable)

  1. Step 1: Check if your SFTP server software allows for inherited root users. Some systems, like Ubuntu/Debian, have a default 'root' user that can be used by all users.
  2. Step 2: If the system supports inherited root users, check which user's SSH configuration file is being used as the default (usually /etcssh/ssh_config).
  3. Step 3: Update your user's SSH configuration file to use the inherited root user. Alternatively, you can also set the 'User' directive in their SSH configuration file to inherit from the system-wide default (e.g., 'root').

💡 Conclusion

By following these steps and understanding the possible causes of the 'User does not have any roots specified' error, you should be able to resolve the issue and allow your users to access their SFTP site without any problems. Remember to always verify your user's SSH configuration file for accuracy and ensure that the root user is correctly specified.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions