Ubuntu Server SFTP Setup Issue

Dataswami

New Member
Joined
Sep 17, 2024
Messages
2
Reaction score
0
Credits
27
Hey guys

I am very new to Linux and have just started my own "homelab" and looking to replace some of the cloud storage I have with a setup locally. As a result i am setting up and SFTP where root user has access for read and write to all folders. But subsequent users only have access to specific folders.

I have followed this guide https://www.ionos.co.uk/digitalguide/server/configuration/set-up-an-ubuntu-sftp-server/

However I am getting some odd behaviours.

If i login via Filezilla with the root user I can see everything however I cant upload any files to the sftp folders. (Home folder is fine but the sftp location is not)

Now when trying to log in with the secondary user it gives me an error of:

Error: Could not connect to server

When checking the server and looking at the status of ssh it shows that the session was opened for that user and password accepted so I have no idea why it gives that error.

Any help would be much appreciated
 


I guess I don't really understand the context of the issue but that's likely due to a lack of caffeine to motivate the ol noggin.

I only glanced over the guide but it looked pretty SOP. But just for clarity and redundancy, this is how I would enable SFTP in Ubuntu (or any other debian based distro)

Install
sudo apt install ssh
Enable
sudo systemctl enable --now ssh

From there, you can ssh username@ipv4 if you're local to remote to the server.

That said, if you're looking for self hosted cloud storage, check out Nextcloud. It's what I use on my homelab cloud.
 
hey so ye all of that is setup the service is running. When i try getting access on a different PC using filezilla i get the issue of not being able to upload files when i login as the root user of the SFTP server. And when i try a secondary user that only has access to one specific directory it jsut doesnt log in with filezilla even though when i look on the sftp server and its status is shows in the logs that the user logs in and has the password accepted.

I will also have a look at next cloud if that can do exactly what i want for a self hosted cloud
 


Members online


Top