Accidentally ran command
sudo chmod -R o+x /home
on my Ubuntu 12.10.
Now what me to do? is that dangerous? I have no backup of partition, so I think this command is not reversible. SO me to reinstall whole system because of this mistake?
The best way to fix this depends on details of how your system is set up. Fortunately, you probably know these details.
On directories (that is, folders), the
If You Don't Currently Use Permissions To Share Files With Other Local Users
If a user (say, you) doesn't need to share files with other users, then it's safe to take away executable permissions for other, so long as you only do it everywhere inside your home folder. Your home folder is
So, you can run:
Then you can run:
Or if you want to prevent others from changing directory into your home folder itself as well:
It's intentional that I haven't written
If You Do Currently Use Permissions To Share Files With Other Local Users
If you have some folders that you do share with other users on the machine (if you do, then you almost certainly know you do), then you can use the above method and then manually add executable permissions on those particular folders. But if you have too many for this to be practical, then especially if you're not worried about other users accessing things that they're not supposed to, you might want to just take away executable permissions from files, and not from folders. After doing this, you can then selectively take executable permissions away from some folders, of course.
To take away executable permissions for other from all the files in your own user's home folder, but not the directories, run:
You just changed file permissions on all user files to executable (and directories to searchable, which is default) for all users - probably not what you want but also probably not the end of the world - especially if you are the only user on the machine.
One think you could do is to do a
If the system is fresh I might consider a re-install just to get it nice and clean :)