Debian: Unable to delete or change permission (no such file or directory)

Discussion in 'Site & Server Administration' started by Joujouba, May 19, 2014.

  1. #1
    Hello,

    I tried rm and change permission chmod but its not working.
    Keeps giving me no such file or directory exist while i can clearly see the directory using filezilla and even browse it.
    any idea?

    thankss
     
    Solved! View solution.
    Joujouba, May 19, 2014 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    Chances are you're probably logged in as a non-root user, or you're attempting to remove files that are not owned by you, in a directory that is. Let us know more about your FileZilla configuration.
     
    zacharooni, May 19, 2014 IP
  3. Joujouba

    Joujouba Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    I'm logged in as root and i even tried using putty SSH as root and same result.. :/
     
    Joujouba, May 19, 2014 IP
  4. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #4
    RHS-Chris, May 19, 2014 IP
  5. Joujouba

    Joujouba Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    Oh ok! so is there a way to delete the file? using chattr?
     
    Joujouba, May 20, 2014 IP
  6. Tier_net

    Tier_net Active Member

    Messages:
    35
    Likes Received:
    5
    Best Answers:
    3
    Trophy Points:
    58
    #6
    first try:

    chattr -ias <file>
    then
    rm -f <file>
     
    Tier_net, May 21, 2014 IP
  7. Joujouba

    Joujouba Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    Hello,

    Sadly it didn't work:
    chattr: No such file or directory while trying to stat music mix.mp3
     
    Joujouba, May 22, 2014 IP
  8. paullopez

    paullopez Active Member

    Messages:
    102
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    68
    #8
    Have you tried tab autocompletion? For example, rm. [TAB]
     
    paullopez, May 22, 2014 IP
  9. Joujouba

    Joujouba Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #9
    Yes that's the first thing i tried and just tried it now..
    Whats happening is very weird :/
     
    Joujouba, May 22, 2014 IP
  10. #10
    Just come across with the following URL. Hopefully helpful J

    http://unix.stackexchange.com/questions/118441/removing-file-which-doesnt-have-any-permissions-and-attributes
     
    paullopez, May 22, 2014 IP
  11. Tier_net

    Tier_net Active Member

    Messages:
    35
    Likes Received:
    5
    Best Answers:
    3
    Trophy Points:
    58
    #11
    Please try putting apostrophe's around the filename:
    'music mix.mp3'

    or

    music\ mix.mp3
     
    Tier_net, May 22, 2014 IP
  12. Joujouba

    Joujouba Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    Yes that didn't work.
     
    Last edited: May 22, 2014
    Joujouba, May 22, 2014 IP
  13. Joujouba

    Joujouba Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #13
    Great!! Thanks all this worked:
    find . -printf "%i %f\n"
    Code (markup):
    once the ID shows ex: 53608458
    do:
    find . -inum 53608458 -delete
    Code (markup):
    Regards!!
     
    Joujouba, May 22, 2014 IP