How to delete unknown file that doesn't have proper permissions












1















My co-worker sent me a theme in a tar.gz file and I tried unzipping it using the archive manager GUI as I usually do for any kind of zipped file. However, it produced a corrupt file/directory that I can no longer delete.



Note that the working directory is in a directory I created in my home folder.



ls -l produces



???????????  ? ?        ?       ?            ? Alt_Elementary_Dark


Right click properties menu says that the permissions could not be determined, and all info is 'unknown' (like size,accessed,modified)



Type is said to be 'Binary (application/octet-stream)', though it should have been a directory.



What I've done to try and remove:



$ sudo rm -rfv Alt_Elementary_Dark
rm: cannot remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo rmdir Alt_Elementary_Dark
rmdir: failed to remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo touch Alt_Elementary_Dark
touch: cannot touch ‘Alt_Elementary_Dark’: Permission denied

$ mv Alt_Elementary_Dark renamed_to_remove
mv: cannot stat ‘Alt_Elementary_Dark’: Permission denied

$ sudo mv Alt_Elementary_Dark renamed_to_remove
mv: failed to access ‘renamed_to_remove’: Permission denied

$ sudo ls -ld Alt_Elementary_Dark
ls: cannot access Alt_Elementary_Dark: Permission denied


Is there some other way I can remove this corrupt, unknown directory?










share|improve this question
















bumped to the homepage by Community 4 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • It looks like the filesystem does not have any information about the file. Try running touch on the file: touch Alt_Elementary_Dark

    – Peschke
    Jun 6 '16 at 17:40






  • 1





    in order to remove a file you need write permissions on the directory, not the file itself. What are the permissions on the working directory?

    – Centimane
    Jun 6 '16 at 17:47











  • @Elixiroflove touching provides the same permission denied results

    – RingOfStorms
    Jun 6 '16 at 20:00






  • 2





    I almost think you might want to run fsck on that filesyste. You also see output like above if there is filesystem corruption.

    – Zoredache
    Jun 6 '16 at 20:24








  • 1





    Is your home directory accessed via NFS? And what's the output from lsattr?

    – Andrew Henle
    Jun 6 '16 at 20:39


















1















My co-worker sent me a theme in a tar.gz file and I tried unzipping it using the archive manager GUI as I usually do for any kind of zipped file. However, it produced a corrupt file/directory that I can no longer delete.



Note that the working directory is in a directory I created in my home folder.



ls -l produces



???????????  ? ?        ?       ?            ? Alt_Elementary_Dark


Right click properties menu says that the permissions could not be determined, and all info is 'unknown' (like size,accessed,modified)



Type is said to be 'Binary (application/octet-stream)', though it should have been a directory.



What I've done to try and remove:



$ sudo rm -rfv Alt_Elementary_Dark
rm: cannot remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo rmdir Alt_Elementary_Dark
rmdir: failed to remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo touch Alt_Elementary_Dark
touch: cannot touch ‘Alt_Elementary_Dark’: Permission denied

$ mv Alt_Elementary_Dark renamed_to_remove
mv: cannot stat ‘Alt_Elementary_Dark’: Permission denied

$ sudo mv Alt_Elementary_Dark renamed_to_remove
mv: failed to access ‘renamed_to_remove’: Permission denied

$ sudo ls -ld Alt_Elementary_Dark
ls: cannot access Alt_Elementary_Dark: Permission denied


Is there some other way I can remove this corrupt, unknown directory?










share|improve this question
















bumped to the homepage by Community 4 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • It looks like the filesystem does not have any information about the file. Try running touch on the file: touch Alt_Elementary_Dark

    – Peschke
    Jun 6 '16 at 17:40






  • 1





    in order to remove a file you need write permissions on the directory, not the file itself. What are the permissions on the working directory?

    – Centimane
    Jun 6 '16 at 17:47











  • @Elixiroflove touching provides the same permission denied results

    – RingOfStorms
    Jun 6 '16 at 20:00






  • 2





    I almost think you might want to run fsck on that filesyste. You also see output like above if there is filesystem corruption.

    – Zoredache
    Jun 6 '16 at 20:24








  • 1





    Is your home directory accessed via NFS? And what's the output from lsattr?

    – Andrew Henle
    Jun 6 '16 at 20:39
















1












1








1








My co-worker sent me a theme in a tar.gz file and I tried unzipping it using the archive manager GUI as I usually do for any kind of zipped file. However, it produced a corrupt file/directory that I can no longer delete.



Note that the working directory is in a directory I created in my home folder.



ls -l produces



???????????  ? ?        ?       ?            ? Alt_Elementary_Dark


Right click properties menu says that the permissions could not be determined, and all info is 'unknown' (like size,accessed,modified)



Type is said to be 'Binary (application/octet-stream)', though it should have been a directory.



What I've done to try and remove:



$ sudo rm -rfv Alt_Elementary_Dark
rm: cannot remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo rmdir Alt_Elementary_Dark
rmdir: failed to remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo touch Alt_Elementary_Dark
touch: cannot touch ‘Alt_Elementary_Dark’: Permission denied

$ mv Alt_Elementary_Dark renamed_to_remove
mv: cannot stat ‘Alt_Elementary_Dark’: Permission denied

$ sudo mv Alt_Elementary_Dark renamed_to_remove
mv: failed to access ‘renamed_to_remove’: Permission denied

$ sudo ls -ld Alt_Elementary_Dark
ls: cannot access Alt_Elementary_Dark: Permission denied


Is there some other way I can remove this corrupt, unknown directory?










share|improve this question
















My co-worker sent me a theme in a tar.gz file and I tried unzipping it using the archive manager GUI as I usually do for any kind of zipped file. However, it produced a corrupt file/directory that I can no longer delete.



Note that the working directory is in a directory I created in my home folder.



ls -l produces



???????????  ? ?        ?       ?            ? Alt_Elementary_Dark


Right click properties menu says that the permissions could not be determined, and all info is 'unknown' (like size,accessed,modified)



Type is said to be 'Binary (application/octet-stream)', though it should have been a directory.



What I've done to try and remove:



$ sudo rm -rfv Alt_Elementary_Dark
rm: cannot remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo rmdir Alt_Elementary_Dark
rmdir: failed to remove ‘Alt_Elementary_Dark’: Permission denied

$ sudo touch Alt_Elementary_Dark
touch: cannot touch ‘Alt_Elementary_Dark’: Permission denied

$ mv Alt_Elementary_Dark renamed_to_remove
mv: cannot stat ‘Alt_Elementary_Dark’: Permission denied

$ sudo mv Alt_Elementary_Dark renamed_to_remove
mv: failed to access ‘renamed_to_remove’: Permission denied

$ sudo ls -ld Alt_Elementary_Dark
ls: cannot access Alt_Elementary_Dark: Permission denied


Is there some other way I can remove this corrupt, unknown directory?







files permissions filesystems corruption






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 9 '16 at 17:02







RingOfStorms

















asked Jun 6 '16 at 17:19









RingOfStormsRingOfStorms

63




63





bumped to the homepage by Community 4 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 4 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • It looks like the filesystem does not have any information about the file. Try running touch on the file: touch Alt_Elementary_Dark

    – Peschke
    Jun 6 '16 at 17:40






  • 1





    in order to remove a file you need write permissions on the directory, not the file itself. What are the permissions on the working directory?

    – Centimane
    Jun 6 '16 at 17:47











  • @Elixiroflove touching provides the same permission denied results

    – RingOfStorms
    Jun 6 '16 at 20:00






  • 2





    I almost think you might want to run fsck on that filesyste. You also see output like above if there is filesystem corruption.

    – Zoredache
    Jun 6 '16 at 20:24








  • 1





    Is your home directory accessed via NFS? And what's the output from lsattr?

    – Andrew Henle
    Jun 6 '16 at 20:39





















  • It looks like the filesystem does not have any information about the file. Try running touch on the file: touch Alt_Elementary_Dark

    – Peschke
    Jun 6 '16 at 17:40






  • 1





    in order to remove a file you need write permissions on the directory, not the file itself. What are the permissions on the working directory?

    – Centimane
    Jun 6 '16 at 17:47











  • @Elixiroflove touching provides the same permission denied results

    – RingOfStorms
    Jun 6 '16 at 20:00






  • 2





    I almost think you might want to run fsck on that filesyste. You also see output like above if there is filesystem corruption.

    – Zoredache
    Jun 6 '16 at 20:24








  • 1





    Is your home directory accessed via NFS? And what's the output from lsattr?

    – Andrew Henle
    Jun 6 '16 at 20:39



















It looks like the filesystem does not have any information about the file. Try running touch on the file: touch Alt_Elementary_Dark

– Peschke
Jun 6 '16 at 17:40





It looks like the filesystem does not have any information about the file. Try running touch on the file: touch Alt_Elementary_Dark

– Peschke
Jun 6 '16 at 17:40




1




1





in order to remove a file you need write permissions on the directory, not the file itself. What are the permissions on the working directory?

– Centimane
Jun 6 '16 at 17:47





in order to remove a file you need write permissions on the directory, not the file itself. What are the permissions on the working directory?

– Centimane
Jun 6 '16 at 17:47













@Elixiroflove touching provides the same permission denied results

– RingOfStorms
Jun 6 '16 at 20:00





@Elixiroflove touching provides the same permission denied results

– RingOfStorms
Jun 6 '16 at 20:00




2




2





I almost think you might want to run fsck on that filesyste. You also see output like above if there is filesystem corruption.

– Zoredache
Jun 6 '16 at 20:24







I almost think you might want to run fsck on that filesyste. You also see output like above if there is filesystem corruption.

– Zoredache
Jun 6 '16 at 20:24






1




1





Is your home directory accessed via NFS? And what's the output from lsattr?

– Andrew Henle
Jun 6 '16 at 20:39







Is your home directory accessed via NFS? And what's the output from lsattr?

– Andrew Henle
Jun 6 '16 at 20:39












3 Answers
3






active

oldest

votes


















0














try to rename it and after that remove it.






share|improve this answer
























  • Also gives no permission, I added those attempts above

    – RingOfStorms
    Jun 6 '16 at 17:43



















0














If it is associated with (application/octet-stream) it is probably a print file of some sort (gs, ps, or pcl). There are a lot of possibilities, but if you go to the cups interface or /etc/cups you should be able to see the print jobs. One is probably stuck and was moved there when a script when wrong.



Do you use any sort of PS to PDF type functionality? This could also push it there.






share|improve this answer


























  • This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

    – RingOfStorms
    Jun 6 '16 at 21:25





















-2














Do sudo chmod ugo+rwx -R . (on the working directory). Also check for IO errors in dmesg.






share|improve this answer


























  • I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

    – RingOfStorms
    Jun 6 '16 at 21:27











  • sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

    – MelBurslan
    Jun 6 '16 at 21:42











  • I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

    – MemCtrl
    Jun 7 '16 at 5:53











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f288004%2fhow-to-delete-unknown-file-that-doesnt-have-proper-permissions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














try to rename it and after that remove it.






share|improve this answer
























  • Also gives no permission, I added those attempts above

    – RingOfStorms
    Jun 6 '16 at 17:43
















0














try to rename it and after that remove it.






share|improve this answer
























  • Also gives no permission, I added those attempts above

    – RingOfStorms
    Jun 6 '16 at 17:43














0












0








0







try to rename it and after that remove it.






share|improve this answer













try to rename it and after that remove it.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 6 '16 at 17:31









BAHADDOU MohammedBAHADDOU Mohammed

84




84













  • Also gives no permission, I added those attempts above

    – RingOfStorms
    Jun 6 '16 at 17:43



















  • Also gives no permission, I added those attempts above

    – RingOfStorms
    Jun 6 '16 at 17:43

















Also gives no permission, I added those attempts above

– RingOfStorms
Jun 6 '16 at 17:43





Also gives no permission, I added those attempts above

– RingOfStorms
Jun 6 '16 at 17:43













0














If it is associated with (application/octet-stream) it is probably a print file of some sort (gs, ps, or pcl). There are a lot of possibilities, but if you go to the cups interface or /etc/cups you should be able to see the print jobs. One is probably stuck and was moved there when a script when wrong.



Do you use any sort of PS to PDF type functionality? This could also push it there.






share|improve this answer


























  • This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

    – RingOfStorms
    Jun 6 '16 at 21:25


















0














If it is associated with (application/octet-stream) it is probably a print file of some sort (gs, ps, or pcl). There are a lot of possibilities, but if you go to the cups interface or /etc/cups you should be able to see the print jobs. One is probably stuck and was moved there when a script when wrong.



Do you use any sort of PS to PDF type functionality? This could also push it there.






share|improve this answer


























  • This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

    – RingOfStorms
    Jun 6 '16 at 21:25
















0












0








0







If it is associated with (application/octet-stream) it is probably a print file of some sort (gs, ps, or pcl). There are a lot of possibilities, but if you go to the cups interface or /etc/cups you should be able to see the print jobs. One is probably stuck and was moved there when a script when wrong.



Do you use any sort of PS to PDF type functionality? This could also push it there.






share|improve this answer















If it is associated with (application/octet-stream) it is probably a print file of some sort (gs, ps, or pcl). There are a lot of possibilities, but if you go to the cups interface or /etc/cups you should be able to see the print jobs. One is probably stuck and was moved there when a script when wrong.



Do you use any sort of PS to PDF type functionality? This could also push it there.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 6 '16 at 20:31

























answered Jun 6 '16 at 20:26









SomeGuySomeGuy

222112




222112













  • This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

    – RingOfStorms
    Jun 6 '16 at 21:25





















  • This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

    – RingOfStorms
    Jun 6 '16 at 21:25



















This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

– RingOfStorms
Jun 6 '16 at 21:25







This file has persisted over restart so I don't believe it to be a stuck job of any sort. I also don't think this has to do with postscript to pdf because it should have just been a directory that got unzipped, there are no pdf's in what the directory should of contained.

– RingOfStorms
Jun 6 '16 at 21:25













-2














Do sudo chmod ugo+rwx -R . (on the working directory). Also check for IO errors in dmesg.






share|improve this answer


























  • I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

    – RingOfStorms
    Jun 6 '16 at 21:27











  • sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

    – MelBurslan
    Jun 6 '16 at 21:42











  • I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

    – MemCtrl
    Jun 7 '16 at 5:53
















-2














Do sudo chmod ugo+rwx -R . (on the working directory). Also check for IO errors in dmesg.






share|improve this answer


























  • I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

    – RingOfStorms
    Jun 6 '16 at 21:27











  • sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

    – MelBurslan
    Jun 6 '16 at 21:42











  • I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

    – MemCtrl
    Jun 7 '16 at 5:53














-2












-2








-2







Do sudo chmod ugo+rwx -R . (on the working directory). Also check for IO errors in dmesg.






share|improve this answer















Do sudo chmod ugo+rwx -R . (on the working directory). Also check for IO errors in dmesg.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 6 '16 at 20:19

























answered Jun 6 '16 at 20:05









MemCtrlMemCtrl

12




12













  • I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

    – RingOfStorms
    Jun 6 '16 at 21:27











  • sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

    – MelBurslan
    Jun 6 '16 at 21:42











  • I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

    – MemCtrl
    Jun 7 '16 at 5:53



















  • I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

    – RingOfStorms
    Jun 6 '16 at 21:27











  • sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

    – MelBurslan
    Jun 6 '16 at 21:42











  • I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

    – MemCtrl
    Jun 7 '16 at 5:53

















I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

– RingOfStorms
Jun 6 '16 at 21:27





I don't think this is the route, this is my home directory on the network so I don't want to mess with permissions (I probably can't even do this as it is managed elsewhere)

– RingOfStorms
Jun 6 '16 at 21:27













sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

– MelBurslan
Jun 6 '16 at 21:42





sweeping commands like this introduce more problems than they solve. And if the user is not able to delete these files or move them, what makes you think that he can change the ownership of these files ?

– MelBurslan
Jun 6 '16 at 21:42













I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

– MemCtrl
Jun 7 '16 at 5:53





I am not suggesting to change his home directory permissions, he said he was in another directory beneath ~. To delete a file you need wx on its parent directory (and maybe r too).

– MemCtrl
Jun 7 '16 at 5:53


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • 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%2funix.stackexchange.com%2fquestions%2f288004%2fhow-to-delete-unknown-file-that-doesnt-have-proper-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

Loup dans la culture

How to solve the problem of ntp “Unable to contact time server” from KDE?

ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux