1

i've created a directory for a nodejs app some time ago, called blog. The app was started with forever start app.js, nothing special.

Now i tried to delete the entire app with folder, i stoped the app and did rm -rf blog -> no permissions - all files in that folder are deleted, but not that directory itself.

I tried setting chown root:root blog -R and chmod 777 blog -R but still no permissions. Another try was to set chattr -i but i still don't have the permission to delete that directory.

Any ideas? The server is a vServer with debian 7

Best regards,

Asto

Update 1: the directory is empty, and i am logged in as root. sudo before the commands doesnt change anything. lsattr blog -Rd shows ---------------- blog

the message rm returns is rm: Entfernen von „blog“ nicht möglich: Keine Berechtigung (No Permissions)

Update 2:

➜ ~ whoami: root

lsattr -Rad blog: ---------------- blog

➜ blog ls -l: insgesamt 0

lsof | grep blog

zsh 19967 root cwd DIR 144,50 4096 109846700 /var/www/clients/client0/web2/blog lsof 23886 root cwd DIR 144,50 4096 109846700 /var/www/clients/client0/web2/blog grep 23887 root cwd DIR 144,50 4096 109846700 /var/www/clients/client0/web2/blog lsof 23888 root cwd DIR 144,50 4096 109846700 /var/www/clients/client0/web2/blog

getfacl blog: zsh: command not found: getfacl

Florian Brinker
  • 173
  • 1
  • 3
  • 10
  • 1
    Does rm return any error? What's the output of lsattr? Are you logged in as root? Have you checked that you didn't have any hidden files left inside with "ls -a"? If there's any, try lsattr on them. – stoned Dec 18 '13 at 10:55
  • Oh, it's a container. Contact your hosting provider for assistance. – Michael Hampton Dec 18 '13 at 20:12
  • @stoned please see my update 1 – Florian Brinker Dec 19 '13 at 10:15
  • @MichaelHampton what dies that mean? i've created the directory on my own with mkdir und untared items into it (maybe sth changed then?) - oh maybe useful: chroot is installed with ispconfig3 – Florian Brinker Dec 19 '13 at 10:16
  • 1
    try `lsattr -Rad`, also post `whoami` and `ls -l` of the "blog" directory. Does `lsof|grep blog` return anything? Do you have the ACL module loaded? If so, what's the output of `getfacl blog`? – stoned Dec 19 '13 at 12:52
  • ty very much, through lsof i saw that the parent path to the blog directory was a link... didn't know that. so i got to the original directory where blog was located and with lsattr i could see that the parent directory had chattr +i set ..... removed it and could delete the directory. Thank you for you help. I've learned allot :/ – Florian Brinker Dec 21 '13 at 14:52

1 Answers1

2

Found out the directory was placed in another directory /var/www/clients/client0/web2 that had chattr +i set. Removed it and could delete the directory blog... Thought the original location was another, but it was a link.

Thanks @stoned for the hints!

Florian Brinker
  • 173
  • 1
  • 3
  • 10