I'm about to create user and set it's home directory inside another user's home directory - I'm wanderin' is it:allowed in *nix worldpossible (I haven't tried in test box yet)and does it have any recognized negative aspect?Case:ftp_user1 home dir is /var/www/vhosts/website/I wantftp_user2 home dir to be /var/www/vhosts/website/subfolder/(of course, I'm aware that I will have to chose one user which will be owner of /var/www/vhosts/website/subfolder/)
User's home directory inside another user's home directory?
linux;home;chown
allowed in *nix worldPractically anything is allowed in the *nix world.possible (I haven't tried in test box yet)Yes, this is possible. When a user is assigned a home directory, that is the directory that the user will cd to by default when logging in. You can change ftp_user2's home directory with the -d option in usermod: usermod -d [directory] [ftp_user2]In your case, it would look like this: usermod -d /var/www/vhosts/website/subfolder ftp_user2If you still need to create ftp_user2, you can assign their home directory while creating them using useradd. useradd -m -d /var/www/vhosts/website/subfolder -s /bin/bash ftp_user2The -m option will create the user's home directory if it does not already exist. The -d option specifies which home directory is to be assigned to the user. The -s option specifies what shell that user will use when logged in. -s is not needed, but it is usually good practice to specify a users default shell if that user will be logged in to.and does it have any recognized negative aspect?The only negative aspect I can think of is: If someone decides to delete ftp_user1 and their home directory, then the home directory for ftp_user2 will also be deleted.