FTP access is confined to the domain's directory

Ubuntu 20.04 Server
I am running a dedicated web server to host my own domains. I’d like to have FTP access to the root , or at leat to the ‘home’ directory to see everything at once.
I went through the previous posts, I have read everything, but nothing seems to work on Ubuntu 20.04 ( the latest version of Virtualmin). Please let me know if there is a solution to fix it. Thanks

You are the only one hosting websites on your server so if you SFTP in as root, you would have access to everything in / home and even beyond.

When you create or edit files as root, it could complicate matters under normal circumstances but Virtualmin has a neat fix (yay!) for exactly this: the fix permissions option under Limits and Validation. After you are done editing files as root, just run this on all virtual servers and all files created / edited by you as root would be assigned to the appropriate user of the virtual server that it has been placed under.

Hope this is the answer you were looking for.

1 Like

Like Calport says, just use your root credentials to FTP in and you’ll get that. You can’t assign those permissions to users for a reason: no user other than the root user is ever supposed to have access to the root directory.

That’s why you only have the public_html view on any virtual server. It assumes that you’re assigning that to somebody else to operate. That is the only directory they need or should have access to. Anything other than that should have to contact you.

It’s a security feature and a good one.

Webmin->Servers->ProFTPd->Files and Directories->Limit users to directories

Thank you for your reply. Already spent 2 days on this, tried everything, reinstalled the whole OS from disk image a few times, but nothing seems to work.

FTP Directory Restrictions is set ‘All files on system’ and ‘All virtual servers’.

Authentication ’ Allow login by root’ yes
Denied FTP Users ‘root’ removed

In Filezilla
username ‘root’
|Status:|Access denied |
|Error:|Authentication failed.|
|Error:|Critical error: Could not connect to server|

Am I missing something?

Did you restart proftpd after making the changes?

What’s in the relevant ProFTPd log(s)?

Yes. Finally did it. The trick is that when logging in as root (Ubuntu 20.04) your username is not ‘root’ but the username you picked when installed Ubuntu, and the same password. Now I can access the file system. Thank you for your comments.

By the way if FTP Directory Restrictions is set ‘All files on system’ and ‘All virtual servers’ has no effect at all.

Yesterday, when I tried to reinstall ProFTP there was a bug in the package. Should I post it here?

We have nothing to do with the ProFTPd package on Ubuntu. If it has a bug, Ubuntu is who to report it to.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.