The test is a directory which contains nothing, an empty directory.root@localhost:~# ls -l  /homedrwxrwxrwx  2 www-data www-data    4096 Apr 26 17:50 testroot@localhost:~# ls  -l  /home/testtotal 0Now I change the username from root into www-data.root@localhost:~# su  www-data$ rm  -rf  /home/testrm: cannot remove `/home/test': Permission denied$ Why can't I remove the blank directory test which belongs to www-data ?It can be removed when I login in as root.root@localhost:~# rm  -rf  /home/testroot@localhost:~# ls -lZ /home/testtotal 0root@localhost:~# getfacl /home/test/getfacl: Removing leading '/' from absolute path names# file: home/test/# owner: www-data# group: www-datauser::rwxgroup::rwxother::rwxroot@localhost:~# ls -al  /hometotal 8352drwxr-xr-x 10 root     root        4096 Apr 26 17:50 .drwxr-xr-x 22 root     root        4096 Mar 20 16:32 ..drwxrwxrwx  2 www-data www-data    4096 Apr 26 17:50 testroot@localhost:~# ls -al  /home/testtotal 8drwxrwxrwx  2 www-data www-data 4096 Apr 26 17:50 .drwxr-xr-x 10 root     root     4096 Apr 26 17:50 ..root@localhost:~#
Why can't I remove the empty directory with username www-data?
permissions;directory;rm