0

this is my ls -all, the zfapi folder have the root right , how can i change this to www-data. Also Please advise what is the first root and secont root is ? Thanks

drwxr-xr-x  4 www-data www-data  4096 2011-01-06 18:21 cdnapi
-rw-r--r--  1 www-data www-data   678 2010-08-30 12:02 config.js
drwxr-xr-x  4 www-data www-data  4096 2010-11-23 15:55 css
drwxr-xr-x  7 www-data www-data  4096 2010-11-17 13:12 images
-rw-r--r--  1 www-data www-data 25064 2010-12-17 18:26 index.html
-rw-r--r--  1 www-data www-data 19830 2010-12-18 11:24 init.js
drwxr-xr-x  2 www-data www-data  4096 2010-12-02 12:34 lib
-rw-r--r--  1 www-data www-data 18758 2010-12-06 18:00 styles.css
-rw-r--r--  1 www-data www-data  1081 2010-10-21 17:56 testbganim.html
drwxr-xr-x  2 www-data www-data  4096 2010-12-17 11:15 yapi
drwxr-xr-x  7 root     root      4096 2011-01-07 18:20 zfapi
0

1 Answer 1

4

To change the ownership,

sudo chown -R www-data:www-data zfapi

The first column is the user that owns the folder. The second column is the group that owns the folder. "sudo" causes you to execute a command with root privileges, so be careful! chown -R recursively changes the ownership of the target directory to the specified user:group. For details,

man chown

You must log in to answer this question.

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