0

Using Ubuntu 16.04, I gave all the permission of my home folder to an unknown username and now I am unable to write to the files under my home folder including Documents, Downloads etc...

How do I give back permission to the current user account?

Zanna
  • 69,223
  • 56
  • 216
  • 327
  • 3
    what exactly did you do to cause the problem? – Zanna Mar 07 '18 at 14:26
  • When i tried to give permission of Apache server to Wordpress to create directory in \var\www\html . – Krishna Kumar S Mar 07 '18 at 14:31
  • 4
    What *exactly* did you do to change the ownership of the home directory? What does `/var/www/html` (mind the slash direction!) have to do with your user account's home directory. Please [edit] your post when you want to clarify something or add information. It’s best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks. – David Foerster Mar 07 '18 at 14:32
  • @devius: No. This question is about **ownership** while your linked question is about **access control flags**. – David Foerster Mar 08 '18 at 12:05

1 Answers1

2

To change the ownership of a directory recursively run

sudo chown -R USER: PATH

and replace USER with the user name and PATH with the path of the directory tree in question (here: the home directory).

David Foerster
  • 35,754
  • 55
  • 92
  • 145