You are not logged in.

#1 2022-07-10 20:48:24

oofyeetmcgee
Member
Registered: 2022-07-10
Posts: 2

Fixing home directory & file permissions

Hello,

So I made a mistake backing up my home partition with rsync, and didn't save any of the file permissions. I've since remade that partition so the originals are lost. To try and fix the permissions I've used chown to set ownership back to my user account. I've also used the following 2 commands:

find /home/oof -type f -exec chmod 0664 {} +
find /home/oof -type d -exec chmod 0775 {} +

I also had to set my .ssh keys manually to 600

Have I done the fix correctly, or should I have used different perms? Are there any other special files ( like .ssh keys ) that require specific perms?

Thanks in advance!

Offline

#2 2022-07-11 10:40:37

dogknowsnx
Guest

Re: Fixing home directory & file permissions

oofyeetmcgee wrote:

Have I done the fix correctly [...]?

No one can know but you. Did you set any custom umask values in '/etc/profile' at some point, for example?

Tbh, I'm out of my comfort zone when it comes to (giving advice on) permissions - anyway, a more sane approach would be 755 for directories and 644 for files. Personally I opt for 600 for shell history files as well, and if I were you I would probably set up my browser (profile) from scratch...

Maybe somebody more knowledgeable will chime in (in that case thank me later for bumping this...)

EDIT: Welcome to the forums

Last edited by dogknowsnx (2022-07-11 10:48:32)

#3 2022-07-12 15:27:40

oofyeetmcgee
Member
Registered: 2022-07-10
Posts: 2

Re: Fixing home directory & file permissions

I haven't set any custom umask or really messed with permissions at all until now. Setting the shell history like that is definitely a good idea. Tbh I think it should probably be fine, I'm the only one using this system anyway. I just wanted to make sure I wasn't doing anything really dumb lol

dogknowsnx wrote:

Welcome to the forums

Thank you!

Offline

Board footer

Powered by FluxBB