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.
This can be caused by the directory containing a directory that is owned by a different user.
Ensure that the directory and all of its subdirectories are owned by the cPanel user. The following command will change ownership to the user where USER is the cPanel user accessing the file manager, and /PATH/TO/DIRECTORY is the full directory path for directories inside of the directory in the error.
chown USER:USER /PATH/TO/DIRECTORY