TransWikia.com

Assign multiple home directories to same user during useradd

Server Fault Asked by Nikster2014 on November 20, 2021

I am working on a project in which a junior developer needs to FTP files onto the server and work in two separate directories that are at the same level on the server. Is is possible to assign BOTH the directories as home directories so when he logs in using FileZilla he sees both the directories listed?

So far I have not found a satisfactory answer anywhere. I am using this command:

useradd -d /path/to/homedir -s /sbin/nologin username

Where /sbin/nologin is a dummy shell I created because user is only allowed to login via FTP and has no shell access.

One Answer

Add the user to an appropriate group. Modify file permissions or ACLs such that this group has access to only the files in question.

Move the files to a directory with nothing else irrelevant in it. Not strictly necessary with suitable file permissions, which already provide access control.

Set their home to (one) parent directory that contains everything they need. Set ftpd to chroot them into home.

Answered by John Mahowald on November 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP