Skip to main content

I can't delete files on Cpanel or via Shell

Comments

8 comments

  • cPanelMichael
    Hello :) Could you elaborate on the files reappearing? Are they deleted and then created again, or does the initial deletion fail? What type of files are these? Thank you.
    0
  • aristomania
    Hi, The folders get deleted on file manager but when I refresh page they reappear, on FTP it says cannot delete files. I want to delete everything uploaded on the server in order to upload a fresh backup and restore it, so all folders (administrator etc). Thank you.;)
    0
  • cPanelMichael
    Please access your server via SSH and run the following commands on a file that you can not delete: lsattr /home/username/path/to/file stat /home/username/path/to/file
    Let us know the output. Thank you.
    0
  • aristomania
    I ran those two codes separatedly and got this " Size: 4096 Blocks: 8 IO Block: 4096 directory Device: adh/173d Inode: 60495175 Links: 10 Access: (0755/drwxr-xr-x) Uid: ( 99/ nobody) Gid: ( 99/ nobody) Access: 2013-09-17 15:32:22.000000000 +0400 Modify: 2013-09-16 16:00:42.000000000 +0400 Change: 2013-09-17 13:28:35.000000000 +0400 " The file is still there, thank you [COLOR="silver">- - - Updated - - - It seems I can create or delete folders on home/user/ but I cannot create or delete files on /home/usr/public_html or /www
    0
  • cPanelMichael
    As you can see, the file is owned by the "nobody" username. The best way to delete these files is via SSH as "root". Thank you.
    0
  • aristomania
    Well I always log as the username "root", besides I don't know how to login on SSH without the "root" username.. I solved this issue by terminating the account and creating a new account on WHM. Thanks
    0
  • Stallyon
    If you're root, next time try chown root:root file.name rm -f file.name
    0
  • cPanelMichael
    [quote="aristomania, post: 1464691">Well I always log as the username "root", besides I don't know how to login on SSH without the "root" username..
    To clarify, you were unable to remove those files via SSH, even when logged in as "root"? If that was the case, you may have wanted to run the "lsattr" command provided earlier to see if they were writable. Thank you.
    0

Please sign in to leave a comment.