Changing File Ownership28 Apr 2016
When UNIX was created back in the 70s, it was strictly developed as multi-user OS. For this reason, files on UNIX had an owner, so that only this owner and the all-mighty root could decide which read, wright and execution rights could be given to the other users on the same system.
Linux and OS X being both UNIX-based operating systems, share this feature.
To change the ownership of file, the
chown command is used.
chown [user] [file]
For assigning the file to your own username, one can use:
chown $(whoami) [file]