I just transferred files from one Linux system to another and my program keeps complaining that it can't get access to those files - Access Denied. However, if I create those files in the linux system I am testing my program on, my program doesn't complain. So, how do you give FULL access or ROOT privileges to all the files and folders in the HOME folder to a user?
1 Answer
You probably just need (as root): chown -R user.usergroup /home/user
.
Be careful, as you will lose the correct ownership, if some files are intentionally owned by another user.
-
-
Use this command only if you know what you are doing, I had to reinstall my system after using it.– BadanCommented Oct 31, 2022 at 16:01
-
There is absolutely no reason why you would have to reinstall your system even when you messed up. When you accidentally change the owner to the wrong user, you can use the same command with the correct user name to change the ownership to the correct user. What can mess up your system is, when you try the same with paths outside of
/home/username
, as certain system files need to be owned by certain system users.– alloCommented Nov 1, 2022 at 17:31