one sunny day on Debian8.7
as a result of this action: dwaves.de/2017/05/10/linux-sftp-ssh-how-to-limit-users-to-their-home-directories/
i got the stated error message:
root@debian:/home/user# ls -lah|grep ICE
-rwxrwxrwx 1 user user 4.7K May 10 16:25 .ICEauthority # chmod ugo+rwx did not help
# the problem is the home directory is owned by root :-D
# because of the chroot sftp "user do not escape home" thingy of the above link
ls -lah /home
drwxr-xr-x 3 root root 4.0K Apr 24 14:11 .
drwxr-xr-x 22 root root 4.0K May 11 09:50 ..
drwxr-xr-x 25 root root 4.0K May 11 09:52 user
# per default user rights are like this:
# the user user has it's own group users and completely owns this directory
drwxr-xr-x 24 user user 4.0K May 11 10:05 user
# fixed the problem
# 1. make root own all user directories
# 2. but at the same time give the user's own group write access to user's home directory
root@debian:~# chown root:user /home/user
root@debian:~# chmod g+w /home/user
so what was the problem?
The user had no write access to his home directory could not create new files via touch 1 2 3
hence the error.
rebooted and gnome2 session started normally.