Can't delete folder

Discussion in 'General' started by Reis Ryos, Nov 20, 2021.

  1. Reis Ryos

    Reis Ryos New Member

    Hello.

    Debian 11 (Bullseye) + ISPConfig 3.2.7p1

    I create new FTP user via ISPConfig UI. I entered the wrong FTP home folder. I accidentally created a folder: /var/www/clients/client1/web1/web01
    I delete this FTP user. But the folder didn't delete itself.

    I tried as root:
    rmdir web01
    result: Operation not allowed

    rm -rf web01
    result: Operation not allowed

    ls -lha
    drwxr-xr-x 2 web1 client1 4,0K 20. lis 20.08 web01

    chmod -R root:root web01
    rm -rf web01
    result: Operation not allowed

    I restarted the server and tried to delete the folder again. Without success.
    How do I delete the folder?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. Reis Ryos

    Reis Ryos New Member

    ls -lha
    drwxr-xr-x 10 root root 4,0K 20. lis 20.08 .
    drwxr-xr-x 3 root root 4,0K 20. lis 20.00 ..
    drwxr-xr-x 2 web1 client1 4,0K 20. lis 18.20 cgi-bin
    drwxr-xr-x 2 root root 4,0K 20. lis 18.20 log
    drwx--x--- 2 web1 client1 4,0K 20. lis 18.20 private
    drwx------ 2 web1 client1 4,0K 20. lis 18.20 .ssh
    drwxr-xr-x 2 root root 4,0K 20. lis 19.52 ssl
    drwxrwx--- 2 web1 client1 4,0K 20. lis 21.09 tmp
    drwxr-x--x 7 web1 client1 4,0K 20. lis 21.01 web
    drwxr-xr-x 2 web1 client1 4,0K 20. lis 20.08 web01

    lsattr
    --------------e------- ./private
    --------------e------- ./web01
    --------------e------- ./cgi-bin
    --------------e------- ./web
    --------------e------- ./ssl
    --------------e------- ./tmp
    --------------e------- ./backup
    --------------e------- ./log

    chattr -i web01
    Nothing output. Try:
    rm -rf web01
    result: Operation not allowed
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    what shows
    Code:
    lsattr -d web01
    You should read the man pages for lsattr and chattr.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    To remove the folder, run this as root user:

    Code:
    chattr -i /var/www/clients/client1/web1
    rm -rf /var/www/clients/client1/web1/web01
    chattr +i /var/www/clients/client1/web1
     
    Reis Ryos likes this.
  6. Reis Ryos

    Reis Ryos New Member

    It worked. Resolved. Thank you.
     

Share This Page