2

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?

5 Answers5

3

First check the permissions of the directory the file's in.

The ls -l output where all except the file name are question marks matches a case of having read permission (= allowed to read the directory listing), but no x permission (= not allowed to access the files within the directory).

After adding the full rwx permissions for yourself for the directory, I think you'll find the ls -l listing will be normal, and then you'll also be able to delete the file normally.

telcoM
  • 96,466
0

try to rename it and after that remove it.

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.

SomeGuy
  • 242
  • 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 06 '16 at 21:25
0

i have one of thease files but thats by the by not a solution but hopefully more information gaind stat the file command as follows sudo stat then file path leading to file /sometdirectory /somedirectory /somedirectory /alt_elermentry dark in this case,

but it would be whatever file you could not read its permissions placed at end of path

directory =folder (type exsactly what you see as path ) the forward slashes seperate the folder exsample /etc/ajaxterm or some directory /some file

-3

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

  • 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 06 '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 06 '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 07 '16 at 05:53