Could not chdir to home directory /home/nsc: Permission denied /bin/bash: Permission denied Connection to 192.168.1.13 closed.

by

in

after creating lxc container, I wasn’t able to connect to it as a simple user. Also couldn’t change to simple user using “su”.

All I got was an error:

Could not chdir to home directory /home/nsc: Permission denied
/bin/bash: Permission denied
Connection to 192.168.1.13 closed.

All permissions of home directory were correct, as to be 100% sure, deleted user and created again. Still the same problem.

The problem was / permissions.
It was 700, so simple user couldn’t change to any directory.

Small fix to make it working (with root user)

chmod 755 /

And that’s it, user is working!!!


Comments

8 responses to “Could not chdir to home directory /home/nsc: Permission denied /bin/bash: Permission denied Connection to 192.168.1.13 closed.”

  1. Brilliant! Thanks!

  2. excellent! it really works!

  3. koyaanisqatsi Avatar
    koyaanisqatsi

    hello,

    how can i fix it on this?:
    ~ # mount
    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro)
    proc on /proc type proc (rw,nodiratime)
    ramfs on /var type ramfs (rw)
    ramfs on /etc type ramfs (rw)

    any way?

    koy

    1. isn’t that live cd ?
      everything should be normal in it.
      If not, paste Your error message, also permissions and owners of all directories to that users home directory.

  4.  Avatar

    finally after hours – its that simple..thank you!!!

  5. Thank you!!!!!!!!!

  6.  Avatar

    Thank you for your information it’s solved.

  7.  Avatar

    thank’s

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.