Score:0

Set up an SFTP server

mo flag

I'm following this guide to set up an SFTP server on Ubuntu 23.04: https://linuxconfig.org/how-to-setup-sftp-server-on-ubuntu-20-04-focal-fossa-linux

I have a question about this step where the guide tells us to create a new user, sudo useradd -m sftpuser -g sftp, why do I need to create a new user? Can't I use my existing account and add myself to the sftp group? Ex: usermod -a -G sftp existingUser

Lastly, I don't want the SFTP folder to exist in /home/sftpuser/, I want it to be on my desktop: /home/existingUser/Desktop/sftp. Is this possible?

Terrance avatar
id flag
The `useradd` command the `-m` switch means to create the user home directory if one doesn't exist, so if it does exist you should be fine there. The `-g` switch means to add the user to the `sftp` login group. The answers can be found when running `man useradd` or `man usermod`. Either command listed there should work fine. As far as using the desktop directory that should be set in the config file for sftp.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.