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.

Can't delete Drupal "sites" directory/subfolders/files

Discussion in 'General Discussion' started by thoughtcat, Nov 9, 2014.

  1. thoughtcat

    thoughtcat Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have lots of old Drupal sites I don't use anymore and am trying to get rid of them all. They're set up as subdomains created in cPanel, so for instance public_html/site1 and public_html/site2 etc. Via FTP I can delete all the contents of these directories except for the /sites directory and all the subfolders and files inside it, where I get "permission denied". Trying to change the file permissions on /sites and its subfolders doesn't work. Can I delete these directories through cPanel somewhere?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The files likely have ownership set to "nobody" if you are using DSO as your PHP handler. You should access your system via SSH as "root" and update the ownership on those subdirectories and file beneath them to the account username. Or, you could just delete the files/directories via SSH as "root".

    Thank you.
     
  3. thoughtcat

    thoughtcat Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks, I'm not sure how to access my system via SSH, but I ended up asking my hosting company to help out and they sorted it, probably doing what you suggested.
     
  4. thoughtcat

    thoughtcat Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi again, actually I have now worked out how to access via SSH (via /http://www.inmotionhosting.com/support/website/ssh/how-to-login-ssh) but it's proving difficult to
    . If I log in as "root" as suggested I can't see how to navigate to the particular account I want. If I log in using the username and password of the actual account I can access the directories but trying to change the ownership gives "operation not permitted" errors. I am referring to this Drupal files page for info: /https://www.drupal.org/node/394704
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Your hosting provider will need to complete this for you if you do not have root access to the server. Otherwise, with root, you can simply browse to the account with a command such as:

    cd /home/$username/

    Thank you.
     
  6. thoughtcat

    thoughtcat Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks so much :) I knew it was something simple like that ;) Did this and was able to finally change the ownership of my files folder and now all is good. Cheers!
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page