The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cur subfolder cannot be deleted

Discussion in 'E-mail Discussions' started by jiahao, Jun 13, 2017.

  1. jiahao

    jiahao Registered

    Joined:
    Jun 13, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Singapore
    cPanel Access Level:
    Website Owner
    Hi,
    I have a mailbox which somehow had the locations of the cur and new folders changed a few years ago. As a result, the cur folder now appears as a subfolder within another folder in the mail account. This folder then has individual folders for each email, although they are empty.

    To show how the folder structure was wrong:
    ~\Username
    cur
    new
    tmp
    Username
    cur
    (subfolder for each email)
    new
    tmp

    The first three folders are correct, but there was then a subfolder which had the normal mail structure. However these subfolders have not been edited for 3 years and are not needed.

    There are now hundreds if not thousands of subfolders, and while trying to delete them individually works, trying to delete the entire cur folder and all subfolders does not work. I have tried deleting the folders from the cPanel file manager, but they still appear in webmail. Is there any way to remove all of these without having to individually remove them?

    Thanks,
    Jiahao
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,163
    Likes Received:
    1,294
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Your access level is listed as "Website Owner". Do you have root access to the system in order to try removing the directories via the command line? If not, please report this issue to your web hosting provider so they can take a closer look and manually remove those directories if necessary. The other option is to backup the emails you'd like to save, delete the email account, and then re-create it.

    Thank you.
     
  3. jiahao

    jiahao Registered

    Joined:
    Jun 13, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Singapore
    cPanel Access Level:
    Website Owner
    Hi,
    Thanks for the reply. I am not sure if I have root access and will need to check. If I do have such access, how would I go about removing them? How is deleting it from command line different from deleting them from the file manager?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,163
    Likes Received:
    1,294
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Assuming it's a permission/ownership issue that's preventing the removal of those files/directories, you can delete all of the them at once if you delete them via the command line as "root".

    Thank you.
     
  5. jiahao

    jiahao Registered

    Joined:
    Jun 13, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Singapore
    cPanel Access Level:
    Website Owner
    Ok then thank you very much for your help.

    Just to check, apart from having to backup emails before hand, there should be no side effects of deleting the email account and recreating it?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,163
    Likes Received:
    1,294
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    No, this essentially re-creates the email account from scratch. Keep in mind this deletes all email data associated with that email account, but you can manually restore that data from the backup you generate if necessary.

    Thank you.
     
Loading...

Share This Page