Can't delete directories despite being owner


I’ve got a wordpress plugin issue. I have about 5 directories, all owned by my user and with permissions (mode) that should allow me to delete, but I can’t. Check it out:

[vela]$ pwd

[vela]$ ls -la google-analytics-for-wordpress
total 8
drwxrwxr-x 2 smerecnik pg1006784 4096 Feb 29 05:06 .
drwxr-xr-x 42 www-data www-data 4096 Jan 3 12:53 …

[vela]$ rm -rf google-analytics-for-wordpress/
rm: cannot remove `google-analytics-for-wordpress’: Permission denied

[vela]$ whoami

Any ideas on how to solve this?


Directories can be thought of as a list of files.

In order to take an item off the list, the list itself has to have the appropriate permissions - you are changing the list, not the file.

In other words, check the permissions and ownership of the plugins directory.


[vela]$ whoami

drwxr-xr-x 42 www-data www-data 4096 Jan 3 12:53

User “smerecnik” is restricted to Read and eXecute permissions on that directory. You’ll require Write privs to delete. If the problem directory is in smerecnik’s userspace, give Support a yell via Panel and they’ll sort it out for you.