CyberPanel Community

Virtual Host Directory already exists. [404]

na
nawaze #1

One of my domain reached its disk quota limit. And the site showing 505 error. I modified the package but it had no result. I tried to delete the website from cyberpanel and deleted the virtual host.

Now the directory of the domain remain in my server and can’t delete the folder, even I can’t change user:group.

I tried so many thing rm -rf and chown and lsof

nothing worked for me. Can anyone help me to sort this out, I want to add that domain again.

17 replies
NK
Nitesh Kunnath #2

rm -rf code when executed what it shown? Any error message?

na
nawaze #3
[root@root public_html]# rm -rf index.php
rm: cannot remove ‘index.php’: Operation not permitted
NK
Nitesh Kunnath #4

If possible, PM me temporary login for me to check the same and find the cause of this issue.

na
nawaze #5

Please check your inbox. credentials sent.

NK
Nitesh Kunnath #6

Solved.

If you face this issue again,

Login to SSH as root and

Navigate to /home/ folder by

cd /home/

Then, execute this command to remove the domain directory (change example.com to your domain name including the tld)

rm -rf example.com

na
nawaze #7

Thank you so much for your time.

AR
André Ribas #8

I’m having the same problem, however, when trying this command I get the following message: (I changed the domain name to example.com)

rm: cannot remove 'example.com/logs': Operation not permitted
rm: cannot remove 'example.com/public_html/index.html': Operation not permitted
Al
Alex #9

sudo rm -rf example.com

It’s a little scary to have mention it… be careful.

AR
André Ribas #10

I am a Root user, I have sudo permission.

Al
Alex #11

oh then it’s probably chattr, chattr -R -i example.com

edit : I didn’t even notice the ‘chattr -R +i /home/%s/’ in IncScheduler.py, very sneaky.

Dr
Dreamer #15

SSH to server

cd /usr/local/lsws/admin/misc

Then execute

./admpass.sh

Then follow prompts

MA
Mohsin Alam #16

Thanks, I have reset the admin password by following your instruction. Then deleted the virtual host but still can’t create the website again. Do I have to do anything to clear the cache or restart the server? Please help.

MA
Mohsin Alam #17

I have solved the issue by doing the steps bellow:

Step 1: Go to http://yourip:7080/ (Look for virtual hosts and delete the duplicate domain.com)

If the admin password doesn’t work then follow this: cd /usr/local/lsws/admin/misc & ./admpass.sh (Reset password)

Step 2: Login via SFTP and look for this path: /root/.acme.sh (Delete the duplicate domain.com).

Step 3: rm -rf /usr/local/lsws/conf/vhosts/domain.com
rm -rf /home/domain.com

Now try to add the website, it should work now. Cheers

TA
Tarik Aziz #18

I Have the Same Problem! Please help me.
rm: cannot remove ‘natunbanglanews.in’: Operation not permitted

Sign in to reply