General

I am unable to delete a file

Updated January 2026 7,814 views 1 min read
General | Updated January 2026

If you cannot delete a file through cPanel File Manager or FTP, the issue is usually file permissions, file ownership, or the immutable attribute. Here is how to fix each case.

Common Causes

Why you cannot delete

  • File or parent directory has wrong permissions
  • File is owned by a different user (root or nobody)
  • File has the immutable attribute set (chattr +i)
  • File is locked by an active process

01. Fix Permissions

To delete a file, you need write permission on the directory containing the file (not just the file itself). Set the parent directory to 755:

chmod 755 ~/public_html/directory-name

Then try deleting the file again.

02. Fix Ownership

If the file is owned by root or another user, you cannot delete it from cPanel or FTP. Via SSH:

chown $USER:$USER ~/public_html/path/to/file
rm ~/public_html/path/to/file

If you do not have SSH access or chown fails, open a ticket and we will remove the file.

03. Immutable Attribute

Some security tools (like Imunify360 or CXS) set the immutable flag on suspicious files to prevent modification or deletion. This requires root access to remove:

chattr -ia ~/public_html/path/to/file

Shared hosting users cannot run chattr. Open a ticket and we will remove the attribute and the file.

Cannot Delete a File?

If none of the above works, open a ticket with the full file path and we will remove it.

Open a Support Ticket

Quick Recap

  1. Check directory permissions - Parent directory needs 755
  2. Check file ownership - Must be owned by your cPanel user
  3. Immutable flag requires root to remove
  4. Contact support for files you cannot remove yourself
  5. Do not use 777 - Fix ownership instead

File management · Last updated March 2026 · Browse all General articles

Share: X in Reddit f Email
  • 151 Users Found This Useful

Was this answer helpful?

Related Articles

When I Type My Domain It Shows the Ultra Web Hosting Homepage

General | Updated January 2026 If you type your domain name into a browser and see the Ultra...

My index page does not load - Why not?

General | Updated January 2026 If your domain loads a directory listing, a default server...

Error 404 - File Not Found

Errors & Troubleshooting | Updated March 2026 A 404 error means the server can't find the...

How do I parse html files as shtml?

General | Updated January 2026 Server Side Includes (SSI) let you include content from one...

Cross Origin Request Error (CORS)

General | Updated March 2026 A Cross-Origin Request (CORS) error occurs when a web page on...



Save 30% on web hosting - Use coupon code Hosting30