1. Home
  2. Knowledge Base
  3. Hosting Management
  4. cPanel
  5. How To Resolve The Issue “Cpanel Won’t let me Delete Folder”

How To Resolve The Issue “Cpanel Won’t let me Delete Folder”

FileOp Failure – Permission denied

If you’re facing this issue you would already be in File Manager inside cPanel.

Step 1: Now go to the root directory and check for a file named as .trash

Step 2: Now check for permissions of the .trash folder. The permission should be set to 0700

Step 3: If you don’t see 0700 under Permissions for the trash folder, right-click and click on click on Change Permissions

Step 4: Make sure all of these boxes are checked.

Step 5: Now click on Change Permissions button on the bottom-right.

Step 6: Now go to the immediate parent directory of the folder that you would like to delete and check for permissions for that folder

Step 7: Right-click on it and click on Change Permissions

Step 8: Make sure all these boxes are checked

Step 9: Now click on Change Permissions

That’s it! Now you can delete your folder

Default Files Deleted

If you removed all of the default file structures, then it’s possible that a required file/folder was removed and can’t be created when deleting the file.  In this case, we would recommend contacting our live technical support team for further assistance.  They have access to your server to add the default files and folders.  Once you have the default files back in place the File Manager should operate normally once again.

FileOp Failure – Directory Not Empty

You may see an error like the following while trying to delete a directory in the cPanel File Manager.

FileOp Failure On: /home/user/public_html/folder Directory not empty.

Ensure that the directory and all of its contents are owned by the cPanel user.

The following example command will change ownership of a file or directory the user where USER is the cPanel user accessing the file manager, and /PATH/TO/FILEORDIRECTORY is the full path to the file or directory.

chown USER:USER <path-to-directory>

Ensure that the directory and its contents are all writeable to the cPanel user. Typically directories will have 755 permissions and files will have 644 permissions.

The following example commands will change the permissions on a file or directory.

chmod 755 <path-to-directory> chmod 644 <path-to-file>
Was this article helpful?

Related Articles