I'm a new user of CentOS and now I want to create a new user of my system and let it can only access one directory.
First I create a group named
useradd -g test -d /home/disk/disk1/testDir testuser
disk1 is a real disk which is mounted in disk1 folder.
And now I can see the
testDir folder and its
ll output is :
drwx------ 2 testuser test 4096 Jul 27 14:48 testDir
And after I set the password and login with
putty. It says:
Could not chdir to home directory /home/disk/disk1/testDir: Permission denied
The folder exists and owned by
testuser. I do not understand why it got permission denied?