I was attempting to give any regular user access to two folders that reside a few branches down in my home folder. I thought I was in the correct directory and typed out sudo chmod 666 *, but accidentally issued this in my own user account's home directory (had multiple terminal windows open at the time). No big deal, I thought, since this would effectively just give every user access to read and write perms in my home folder. I'll just use chown to switch everything back to just my account.

However, now some folders have become Binary files and nothing within my home directory can be opened. I get errors telling me I do not have permission to access the files, and if I try read file permission values the gnome3 "Files" application says:

The permissions of [file in question] cannot be determined.

I've tried using chown [user] * to restore ownership to the proper accounts but it doesn't seem to have any effect. Also, I thought chmod 666 would give any user read and write access, so I don't understand how this problem arose.

Any suggestions?

I'm using Arch Linux with Gnome 3

up vote 3 down vote accepted

Many operations on directories require execute (search) permission in addition to read permission. chmod 666 clears the x bits, causing strange failures of ls and other basic stuff. Reasonable default permissions might be 644 for files and 755 for directories.

Well, I figured it out!

Most of the functionality in my home directory relied on the group permission, not just my individual user permission.

After I changed the group permission to read / write / create + delete files, everything went back to normal :-)

Hopefully this helps someone else out there in time!

  • Notice that there are files, like SSH keys, that simply should not be readable by anyone other than the creator of those files for security reasons. – Kusalananda Aug 16 '17 at 6:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.