I am using RedHat Gnu/Linux I have a group of 10 users, and I'd like to restrict the access to all of them. Here are the rules I'd like to respect for them:
- For each user
user_i
, there is a folder nameduser_i
. Theuser_i
should have writing and reading permissions on his directory and all the files/directories in it. - When the
user_i
connects to the machine, he should find himself in theuser_i
directory by default. - He (user
user_i
) can't see the other directories or files and has no access to them. Theuser_i
directory is his "root" directory.
I created the group, I created all users and assigned them to this one group, and I created all folders. But I don't know how to continue beyond this.
I looked online and on this website. Most results found talk about modifying /etc/ssh/sshd_config
for users connecting with SSH, while mine also needs to connect via FTP and SFTP. And other guides talk about giving access to all users of a certain group to one shared folder, which isn't my case because I need a separate folder to every user.
Edit:
Thanks everyone for your interaction and the useful information and I apologize about the confusion. Here I'll clarify the specification:
The
user_i
folders are new folders created in /transfers directory specifically for every user and named after its username. So the hierarchy looks similar to this:/ --transfers/ ----user_i/ ------received_data/ ------archive_data/
Every
user_i
will write and read data in the subfoldersreceived_data
andarchive_data
. He can't access any other directory, including the typical Linux directories and specifically the directories of other users (the other 9user_i
).By connecting to the server, he should get to
user_i
folder by default, and therefore only see the two subfoldersreceived_data
andarchive_data
.All
user_i
belong to a group created specifically for them.
man chmod
. I see nothing in your spec that groups these users.