After creating a new user, can't access home folder
I've just finished setting up my new Linode (apache/php/mysql etc).
Now I'd like to take steps to improve security, and from what I've read, disabling ssh for the root account & creating another user account is a good idea.
I'm able to create the new user with this command -
> adduser –home /home/user1 --shell /bin/bash
However after ssh'ing with the new user, I can't access the home folder. Does the home folder require further permissions setup, or have I missed an option when creating the user?
The error message I get after ssh login is -
> Could not chdir to home directory /home/aobyrne: Permission denied
-bash: /home/aobyrne/.bash_profile: Permission denied
The 'home' folder appears to be owned by user '501' with group 'staff', which seems to be different to all the other folders which with user & group as 'root'.
Cheers,
Adam.
2 Replies
Regardless just chown -R the $HOME to the UID & Group of the user you created and you should be fine.
Troy.
adduser aobyrne
Would create your user with access to /home/aobyrne