Score:1

How can I set specific directory for different users in proftp?

sa flag

Currently, when user A logs in proftp, he comes at his home directory /home/A, when user B logs in proftp, he comes at his home directory /home/B. I want to let user A come at /dir1 and let user B come at /dir2, how can I do in proftpd's configuration file?

OldFart avatar
uz flag
Symlinks could help, even if not applicavle to all situations... https://askubuntu.com/a/41201/638590
peter avatar
sa flag
@OldFart That works! Thank you!
OldFart avatar
uz flag
It certainly isn't a 'solution' as it can increase confusion in the long run and with future server updates or worse, migrations. symlinks/hardlinks will almost always work as either a GREAT workaround or a very CRUDE and dodgy one. Workaround nonetheless when it comes down to this specific situation. Bounty them points to whomever's solution i pasted - felt it was best to paste something that was relevant rather than just add 'try symlinking'. Anyways, glad it worked out, edit your question to add your solution for further reference...
Score:0
ru flag

You can specify the home directory for each user in the proftpd configuration file. To do this, you would need to add a DefaultRoot directive to the configuration file, specifying the directory that each user should be placed in upon login. For example:

# This directive specifies the directory that user A should be placed in
# upon login.
<User A>
  DefaultRoot /dir1
</User A>

# This directive specifies the directory that user B should be placed in
# upon login.
<User B>
  DefaultRoot /dir2
</User B>

You would then need to restart the proftpd service in order for the changes to take effect.

peter avatar
sa flag
I cannot start proftpd with the <User> directive: fatal: unknown configuration directive '<User>'. There does exist a line in proftpd.conf: "User nobody", but that means "Set the user that the server runs as nobody".
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.