Can't delete folder with ? in permissions












1















I have a mount point where a USB drive is usually mounted. The USB drive is currently disconnected. If I try to attach it, it won't mount, and a bit of investigation discovered there's nothing wrong with the USB drive, but the mount point.



alan@hal:~$ ls -l /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


alan@hal:~$ ls -l /media/alan/
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error
total 0
d????????? ? ? ? ? ? 9098a06f-f509-452a-b2b8-3f00aee808a2


alan@hal:~$ sudo rm -rf /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
rm: cannot remove '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Is a directory


alan@hal:~$ sudo chmod 600 /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
chmod: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


How can I remove this directory?



Edit: Surprisingly sudo umount /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 removed it!? However, every time I re-attach the disk, I still get IO errors.










share|improve this question




















  • 1





    I/O is error might be the sign of a failing device. Are you sure the device is okay physically?

    – heemayl
    Jan 22 at 13:42











  • Looks like there are two possibilities: 1. You have read but not execute permissions on the directory you want to delete, or its parent directory. 2. Your disk is failing/has failed.

    – pwaring
    Jan 22 at 13:46











  • can you check the attributes on the catalogue? lsattr

    – Orphans
    Jan 22 at 13:56











  • Internal disk otherwise seems fine. I'm not convinced there's a disk failure as everything else is okay.

    – popey
    Jan 22 at 14:17
















1















I have a mount point where a USB drive is usually mounted. The USB drive is currently disconnected. If I try to attach it, it won't mount, and a bit of investigation discovered there's nothing wrong with the USB drive, but the mount point.



alan@hal:~$ ls -l /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


alan@hal:~$ ls -l /media/alan/
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error
total 0
d????????? ? ? ? ? ? 9098a06f-f509-452a-b2b8-3f00aee808a2


alan@hal:~$ sudo rm -rf /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
rm: cannot remove '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Is a directory


alan@hal:~$ sudo chmod 600 /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
chmod: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


How can I remove this directory?



Edit: Surprisingly sudo umount /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 removed it!? However, every time I re-attach the disk, I still get IO errors.










share|improve this question




















  • 1





    I/O is error might be the sign of a failing device. Are you sure the device is okay physically?

    – heemayl
    Jan 22 at 13:42











  • Looks like there are two possibilities: 1. You have read but not execute permissions on the directory you want to delete, or its parent directory. 2. Your disk is failing/has failed.

    – pwaring
    Jan 22 at 13:46











  • can you check the attributes on the catalogue? lsattr

    – Orphans
    Jan 22 at 13:56











  • Internal disk otherwise seems fine. I'm not convinced there's a disk failure as everything else is okay.

    – popey
    Jan 22 at 14:17














1












1








1








I have a mount point where a USB drive is usually mounted. The USB drive is currently disconnected. If I try to attach it, it won't mount, and a bit of investigation discovered there's nothing wrong with the USB drive, but the mount point.



alan@hal:~$ ls -l /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


alan@hal:~$ ls -l /media/alan/
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error
total 0
d????????? ? ? ? ? ? 9098a06f-f509-452a-b2b8-3f00aee808a2


alan@hal:~$ sudo rm -rf /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
rm: cannot remove '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Is a directory


alan@hal:~$ sudo chmod 600 /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
chmod: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


How can I remove this directory?



Edit: Surprisingly sudo umount /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 removed it!? However, every time I re-attach the disk, I still get IO errors.










share|improve this question
















I have a mount point where a USB drive is usually mounted. The USB drive is currently disconnected. If I try to attach it, it won't mount, and a bit of investigation discovered there's nothing wrong with the USB drive, but the mount point.



alan@hal:~$ ls -l /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


alan@hal:~$ ls -l /media/alan/
ls: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error
total 0
d????????? ? ? ? ? ? 9098a06f-f509-452a-b2b8-3f00aee808a2


alan@hal:~$ sudo rm -rf /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
rm: cannot remove '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Is a directory


alan@hal:~$ sudo chmod 600 /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 
chmod: cannot access '/media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2': Input/output error


How can I remove this directory?



Edit: Surprisingly sudo umount /media/alan/9098a06f-f509-452a-b2b8-3f00aee808a2 removed it!? However, every time I re-attach the disk, I still get IO errors.







permissions mount






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 22 at 14:17







popey

















asked Jan 22 at 13:27









popeypopey

12.9k74791




12.9k74791








  • 1





    I/O is error might be the sign of a failing device. Are you sure the device is okay physically?

    – heemayl
    Jan 22 at 13:42











  • Looks like there are two possibilities: 1. You have read but not execute permissions on the directory you want to delete, or its parent directory. 2. Your disk is failing/has failed.

    – pwaring
    Jan 22 at 13:46











  • can you check the attributes on the catalogue? lsattr

    – Orphans
    Jan 22 at 13:56











  • Internal disk otherwise seems fine. I'm not convinced there's a disk failure as everything else is okay.

    – popey
    Jan 22 at 14:17














  • 1





    I/O is error might be the sign of a failing device. Are you sure the device is okay physically?

    – heemayl
    Jan 22 at 13:42











  • Looks like there are two possibilities: 1. You have read but not execute permissions on the directory you want to delete, or its parent directory. 2. Your disk is failing/has failed.

    – pwaring
    Jan 22 at 13:46











  • can you check the attributes on the catalogue? lsattr

    – Orphans
    Jan 22 at 13:56











  • Internal disk otherwise seems fine. I'm not convinced there's a disk failure as everything else is okay.

    – popey
    Jan 22 at 14:17








1




1





I/O is error might be the sign of a failing device. Are you sure the device is okay physically?

– heemayl
Jan 22 at 13:42





I/O is error might be the sign of a failing device. Are you sure the device is okay physically?

– heemayl
Jan 22 at 13:42













Looks like there are two possibilities: 1. You have read but not execute permissions on the directory you want to delete, or its parent directory. 2. Your disk is failing/has failed.

– pwaring
Jan 22 at 13:46





Looks like there are two possibilities: 1. You have read but not execute permissions on the directory you want to delete, or its parent directory. 2. Your disk is failing/has failed.

– pwaring
Jan 22 at 13:46













can you check the attributes on the catalogue? lsattr

– Orphans
Jan 22 at 13:56





can you check the attributes on the catalogue? lsattr

– Orphans
Jan 22 at 13:56













Internal disk otherwise seems fine. I'm not convinced there's a disk failure as everything else is okay.

– popey
Jan 22 at 14:17





Internal disk otherwise seems fine. I'm not convinced there's a disk failure as everything else is okay.

– popey
Jan 22 at 14:17










1 Answer
1






active

oldest

votes


















2














Not sure if this helps but I once had a very similar problem. Turned out the file manager RANGER could handle it (not sure why)



Ranger is not user friendly, basically launch it via command line (ranger, once its installed) and then use arrow keys (or vim keys) to navigate to the folder you are trying to delete, press 'Shift d' (uppercase D) and then hit enter, should remove the folder)



good luck :)






share|improve this answer
























  • Never tried Ranger, will try it :)

    – popey
    Jan 22 at 14:08











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111960%2fcant-delete-folder-with-in-permissions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Not sure if this helps but I once had a very similar problem. Turned out the file manager RANGER could handle it (not sure why)



Ranger is not user friendly, basically launch it via command line (ranger, once its installed) and then use arrow keys (or vim keys) to navigate to the folder you are trying to delete, press 'Shift d' (uppercase D) and then hit enter, should remove the folder)



good luck :)






share|improve this answer
























  • Never tried Ranger, will try it :)

    – popey
    Jan 22 at 14:08
















2














Not sure if this helps but I once had a very similar problem. Turned out the file manager RANGER could handle it (not sure why)



Ranger is not user friendly, basically launch it via command line (ranger, once its installed) and then use arrow keys (or vim keys) to navigate to the folder you are trying to delete, press 'Shift d' (uppercase D) and then hit enter, should remove the folder)



good luck :)






share|improve this answer
























  • Never tried Ranger, will try it :)

    – popey
    Jan 22 at 14:08














2












2








2







Not sure if this helps but I once had a very similar problem. Turned out the file manager RANGER could handle it (not sure why)



Ranger is not user friendly, basically launch it via command line (ranger, once its installed) and then use arrow keys (or vim keys) to navigate to the folder you are trying to delete, press 'Shift d' (uppercase D) and then hit enter, should remove the folder)



good luck :)






share|improve this answer













Not sure if this helps but I once had a very similar problem. Turned out the file manager RANGER could handle it (not sure why)



Ranger is not user friendly, basically launch it via command line (ranger, once its installed) and then use arrow keys (or vim keys) to navigate to the folder you are trying to delete, press 'Shift d' (uppercase D) and then hit enter, should remove the folder)



good luck :)







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 22 at 13:54









Hex DSLHex DSL

211




211













  • Never tried Ranger, will try it :)

    – popey
    Jan 22 at 14:08



















  • Never tried Ranger, will try it :)

    – popey
    Jan 22 at 14:08

















Never tried Ranger, will try it :)

– popey
Jan 22 at 14:08





Never tried Ranger, will try it :)

– popey
Jan 22 at 14:08


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111960%2fcant-delete-folder-with-in-permissions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀