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 files or folders using filemanager or ftp access

Discussion in 'General Discussion' started by bcp1961, May 17, 2003.

  1. bcp1961

    bcp1961 Member

    Joined:
    Apr 15, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Naples, Floride
    I've tried setting the folders and files to '777' but still get this error:
    Permission denied mv: cannot unlink `pages/11.html':

    Does anyone know what that means and how to correct it. I can't even delete through my ftp access, I get a 550 error "Permission denied"...?
     
    #1 bcp1961, May 17, 2003
    Last edited: May 17, 2003
  2. Nico

    Nico Well-Known Member

    Joined:
    Dec 5, 2001
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Edmond, OK
    Try 'chattr -i file name' and see if you can delete the file.
     
  3. NNNils

    NNNils Well-Known Member

    Joined:
    Sep 17, 2002
    Messages:
    580
    Likes Received:
    0
    Trophy Points:
    16
    Is there also a solution for this users can do themselves (without shell access)?

    cPanel.net Support Ticket Number:
     
  4. bcp1961

    bcp1961 Member

    Joined:
    Apr 15, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Naples, Floride
    This is the script that I am using to unlink my files and folders. It seems to work very well, you can just put a folder name in if you want to delete all the files in it, but then you have to ftp in or go through the control panel and delete them manually after running the script below. If you are just deleting certain files then this will automatically delete them for you. For some reason when you execute the script it gives you a "Warning: operation not permitted....." error message - but it still works. I haven't figured that one out yet!
    Hope this helps.

    PHP:
    <?php
    chmod
    ("folder/file.html"0777); // let the system put it open

    chown("folder/file.html"0730); //scripts UID becomes owner

    unlink("folder/file.html"); //delete the file
    ?>
    cPanel.net Support Ticket Number:
     
  5. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Hey thanks! The "chattr -i" command worked for me. I was banging my head on the wall trying to get this one file to delete, and now I can finally rest! Thanks again!
     
Loading...

Share This Page