0

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

2 Answers 2

3

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.

0

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!

1
  • 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
    Commented Aug 16, 2017 at 6:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .