Belajar Sendiri

Commands

sudo chown

sudo chown <owner>[:<group>] <path>

Risk: Careful

What it does

Hands a file or folder to another owner (and group). Needs root.

When to use it

When a service user, like www-data, must write somewhere.

Example

$ sudo chown www-data:www-data uploads

Give the uploads folder to the web staff.

$ sudo chown -R www-data:www-data uploads

The folder and everything inside. Check the path twice.