# file permissions



## zorb847 (May 14, 2017)

Sorry for another noobie question
I broke my system beyond the point that I can fix it and seems that it will be easier to just to format and re-install.
I have my home directory copied off to an external drive.
My question is: if after I re-install, I will create user with the same name and then copy my files back into home directory, will I be able to access and modify without problems?
It seems to me that I tried this in windows a long time ago but there was a problem but I think some of the files were encrypted.
No encryption here, this is just my desktop computer but some of the files are important.


----------



## getopt (May 14, 2017)

zorb847 said:


> will I be able to access and modify without problems?


That should work. If there might be a problem root can change any permissions with chown(8) and chmod(8).


----------



## ShelLuser (May 14, 2017)

zorb847 said:


> if after I re-install, I will create user with the same name and then copy my files back into home directory, will I be able to access and modify without problems?


Depends. It's not so much the name but the ID (number) which is important here. Fixing it is easy though. `# chown -R <name of owner>` and you should be just fine.


----------



## SirDice (May 15, 2017)

zorb847 said:


> My question is: if after I re-install, I will create user with the same name and then copy my files back into home directory, will I be able to access and modify without problems?
> It seems to me that I tried this in windows a long time ago but there was a problem but I think some of the files were encrypted.


Windows permissions are based on the SID of a user account. Part of the SID changes when you re-install Windows. So even though you created the exact same user the SID will be different. On UNIX this isn't the case. As long as your UID and GID are the same you will be able to access the files. If you have a different UID/GID you can change the ownership easily with chown(1).


----------

