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 test. Then:useradd -g test -d /home/disk/disk1/testDir testuserThe 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 testDirAnd after I set the password and login with testuser by putty. It says:Could not chdir to home directory /home/disk/disk1/testDir: Permission deniedThe folder exists and owned by testuser. I do not understand why it got permission denied?
Could not chdir to home directory when create and login a new user?
permissions
When you can not access to the directory you have right permissions, the first thing you should check is your access rights with parent directories:ls -ld /home/diskand:ls -ld /home/disk/disk1You need at least execute permission to access the child of those directories.