Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2011
    Location
    Auckland, New Zealand
    Posts
    1

    Default Can't delete a folder

    Im having problem with this folder which is named "PEAR" at the /public_html. I installed this sort of application and I'm trying to delete it because I want to install a new version, but it keeps coming back. Do you know what the problem could be?

  2. #2
    Member
    Join Date
    Mar 2007
    Posts
    29

    Default Re: Can't delete a folder

    Quote Originally Posted by masterfujin View Post
    Im having problem with this folder which is named "PEAR" at the /public_html. I installed this sort of application and I'm trying to delete it because I want to install a new version, but it keeps coming back. Do you know what the problem could be?
    Hello,

    If you are not able to delete it then make sure ownership of the directory is correct. Also check the attribute set to this directory. You can check the same using command.

    lsattr it shall be ------------- . If it contains a/u/i then that could be the problem.

    Regards,
    host.co.in

  3. #3
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Can't delete a folder

    Hello,

    To expand on what forum17 has mentioned, you could run the following in root SSH to see the ownership and file permissions for the PEAR folder:

    Code:
    ls -ld /home/user/public_html/PEAR
    Please replace user with the cPanel username. If the directory is not owned by the right user (so possibly root or nobody owns the file) or has 000 file permissions, this could well be why it isn't letting you remove it.

    Next, for the lsattr command, again put the full path for public_html to see the permissions on it:

    Code:
    lsattr /home/user/public_html
    Then check what the PEAR folder shows for that command. You might also want to drill into the folder to run lsattr on it, since anything with immutable attributes will prevent the folder from being deleted (here immutable will be an i showing up when running lsattr). You can unset the immutable bit on a file or folder by running:

    Code:
    chattr -i /home/user/public_html/PEAR
    If there are files within the directory that are immutable, you can do this recursively:

    Code:
    chattr -i -R /home/user/public_html/PEAR
    Thanks.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. Delete public_html folder
    By rongup in forum New User Questions
    Replies: 5
    Last Post: 04-17-2009, 11:35 AM
  2. Can't Delete Files ot Folder
    By Possumnz in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-04-2008, 05:48 PM
  3. how to delete .\ folder
    By thewebhosting in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-21-2008, 10:29 AM
  4. Dont delete this folder - folder interal data
    By ozzi4648 in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 06-27-2006, 10:18 AM
  5. How to delete a folder
    By mta in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-17-2003, 08:16 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube