bad ownership or modes for chroot directory

Centos 7.  user no longer able to access home dir.   Secure log shows fatal: bad ownership or modes for chroot directory "/home/username" [postauth].  Root owns /home, user owns /home/username.  Permissions are currently at 755.   What am I missing?
SpyderDesignsAsked:
Who is Participating?
 
Jan SpringerConnect With a Mentor Commented:
You want "lshell".  Install it, add it to /etc/shells, and change the account shell.

It's a restricted shell that can be used with ssh/sftp/scp that chroots the user and allows you to specify what commands can be run.

I use it and love it.
0
 
Jan SpringerCommented:
ls -lZd /home/username

What is the complete output?
0
 
SpyderDesignsAuthor Commented:
drwxr-xr-x. username groupname unconfined_u:object_r:user_home_dir_t:s0 /home/username
0
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
Jan SpringerCommented:
chmod -R user:group /home/user
restorecon -R /home/user

ls -lZR /home/user

grep user /etc/passwd
0
 
SpyderDesignsAuthor Commented:
Assume you mean chown.  Yeah tried restorecon.  Turned off selinux temporarily.  Same problem.

Grep shows user:x:1001:1003::/home/userdir:/sbin/nologin.  Believe that is what I want as I want sftp but not ssh
0
 
SpyderDesignsAuthor Commented:
Forgot, files show unconfined_u:object_r:user_home_t:s0
0
All Courses

From novice to tech pro — start learning today.