I have created a directory /home/web/test on a Debian server using a basic unprivileged account web. Another account — tomcat — then created some subdirectories and files in that folder (as you might have guessed, tomcat is a web application).
I would like to delete that test folder now, but I can't be because tomcat owns directories and files under it. I get Permission Denied errors when I try. Here's how it's set up:
ls -l /home/web
drwxrwxrwx 3 web users 4096 2011-04-19 12:06 test
ls -l /home/web/test
drwxr-xr-x 46 tomcat tomcat 4096 2011-04-19 12:06 www
ls -l /home/web/test/www
-rw-r--r-- 1 tomcat tomcat 9939 2011-04-19 12:44 test1.html
-rw-r--r-- 1 tomcat tomcat 16346 2011-04-19 12:44 test2.html
...
rm -rf /home/web/test
rm: cannot remove `/home/web/test/www/test1.html': Permission denied
rm: cannot remove `/home/web/test/www/test2.html': Permission denied
...
Is there any way that I can delete the /home/web/test folder using the web account — ie without logging in as tomcat or root?
After all, I own /home/web/test, shouldn't I be able to do anything I want with it?