rm: cannot remove `/../...v': Permission denied

35,012

Solution 1

rm -rf 982899 will try to recursively remove anything inside that directory, and then, once it is empty, remove the directory itself. So your problem may be that you do not have permission to delete the items inside 982899. You can try to chmod -R 777 982899, or chown -R <your_user> 982899 to get around this. Be careful though that chxxx commands use an uppercase -R for recursive operation.

Solution 2

It is possible that the below message:

rm: cannot remove `982899/.../...v': Permission denied

was caused as the owner of the file is another user (e.g. root).

This can be solved by running as root by using sudo

sudo rm -rf 982899
Share:
35,012

Related videos on Youtube

Yuan Wen
Author by

Yuan Wen

Got master degree from Chinese Academy of Sciences,bachelor degree from HuaZhong University of Science of Technology.Major is Electronic and Information.

Updated on September 18, 2022

Comments

  • Yuan Wen
    Yuan Wen over 1 year

    I want to delete directory 982899. It is located under directory big. When I first try to delete 982899, it shows many lines of messages like this:

    rm: cannot remove `982899/.../...v': Permission denied

    So I use chmod 777 . to make directory big be able to change everything.

    However, after it, rm -rf 982899 still shows the same messages:

    rm: cannot remove `982899/.../...v': Permission denied

    I even executed chmod 777 982899, but nothing changed!

    Why ? What should I do to delete directory 982899?

    • Stephen Rauch
      Stephen Rauch about 7 years
      chmod -R 777 982899
  • Yuan Wen
    Yuan Wen about 7 years
    I copied 982899 from other place to my directory. I'm not in the sudoers file, So I can't use sudo rm -rf 982899 . Is there another way?
  • Yaron
    Yaron about 7 years
    what is the result of running ls -lsa 982899/.../...v ?
  • Mio Rin
    Mio Rin about 7 years
    If you can't use sudo, then you might be able to switch to root with su, then try rm -r 982899 again. If you have no root access, then you need to contact the administrator of the machine.
  • Yuan Wen
    Yuan Wen about 7 years
    hoe is right@Yaron I have remove the directory successfully.
  • Yaron
    Yaron about 7 years
    @YuanWen great :)