0

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
  • You give privileges to users not files and folders. Files and folders are the owned by a user and the permissions are set for Owner, Group, and Other.
    – Tyson
    May 25, 2016 at 14:47

1 Answer 1

2

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.

3
  • Fantastic... :)
    – ThN
    May 25, 2016 at 14:43
  • Use this command only if you know what you are doing, I had to reinstall my system after using it.
    – Badan
    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.
    – allo
    Nov 1, 2022 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .