[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Lesson learned / file permissions


In one of my moments last night I thought, why should any of the files in 
my home directory need to be world-accessible? I didn't think long about 
it before I decided to remove all read, write and execute rights for 
world. Before I did that, however (and thank god for that), I saved all 
the existing permissions to a file:

$ find /home/username/ -xdev -printf "%m %p\n" > permissions.txt


$ sudo chmod o-rwx /home/username/*
$ sudo chmod o-rwx /home/username/.*

After that, all hell broke lose. I couldn't start any new KDE application, 
existing applications complained about insufficient rights, no temporary 
or session files could be written etc. I couldn't even access my home 
directory after I restarted. Luckily I was able to restore all previous 
file permissions with the saved file and got back into my user account 
this morning. So, lesson learned. Don't mess with things you don't need 
to mess with, make backups, and be less paranoid. :)

I think it was the fact that /home lost all world-permissions that caused 
all the problems. Would you agree?

Secondly, by calling chmod with sudo, all the files owned by root that I 
as a user needed to see were now invisible. But they don't seem to be so 
many so I am wondering if that had any influence.

Should I simply leave the .* files in my home directory alone? :) I 
acually found some that had 777 permissions which I didn't like. All my 
documents are 750 or less and the umask is set to 027. Is that ok for 

Best regards
Olle Eriksson

Reply to: