-bash: /home/user/.bash_logout: Permission denied

Recently, I faced a unique challenge when migrating users to a new Linux server. I had given them ownership of their respective home directories, but to my surprise, they encountered permission errors when trying to access their bash_logout, bashrc, and bash_profile files. One error that stood out was “-bash: /home/user/.bash_logout: Permission denied.” In some cases, they couldn’t even access their home folders at all.

After struggling to troubleshoot the issue, I finally realized that the /home directory had incorrect permissions. To resolve the problem, I simply adjusted the ownership and permissions of /home using the following commands:

# chown root:root /home
# chmod 755 /home

Once I made these changes, everything worked smoothly for the users. It’s essential to ensure that all directories and files have the correct permissions when setting up a new server or making changes to an existing one.

1 Comment
  1. Elvis 1 year ago

    Thank you very much

Leave a reply

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

*

©2024 ZMATECH: Innovative solutions for your IT challenges.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

Log in with your credentials

Forgot your details?