I'm trying to delete two folders on a drive on an Ubuntu server which were created by Windows (drive previously mounted on Windows and their content is just garbage now).
I've tried everything I can think of, with the errors returned being very different:
chmod 777
the directories (No such file or directory
)rm
withsudo
and correct options (Permission denied
)- Tried to delete by inode number via
find
(Directory not empty
orPermission denied
)
Hierarchy structure:
/media/mattgeek/programmi/WindowsApps/
- SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/ - Apps/ (Unknown content not visible with ls -al) - AppxMetadata/ CodeIntegrity.cat - Assets/ (Unknown content not visible with ls -al) chrome_elf.dll - locales/ (Unknown content not visible with ls -al) - swiftshader/ libEGL.dll libDLESv2.dll
/media/mattgeek/programmi/WpSystems/S-1-5-21-2951927762-82725512-1342253419-1001/
- AppData/ - Local/ - Packages/ - SpotifyAB.SpotifyMusic_zpdnekdrzrea0/ - Settings/ (contains an inaccessible file with unknown inode and unknown permissions)
These are the outputs of the commands I've tried (in root mode):
rm -f /media/mattgek/programmi/WindowsApps rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/chrome_elf.dll': No such file or directory rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
rm -rvf /media/mattgek/programmi/WindowsApps rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
rm --recursive -f /media/mattgek/programmi/WindowsApps rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove '/media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
# Directory inode number: 479380 find . -inum 479380 -delete find: cannot delete './media/mattgeek/programmi/WindowsApps': Directory not empty
# Directory inode number: 479380 find . -inum 479380 -exec rm -rf {} \; rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Apps': Directory not empty rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/AppxMetadata/CodeIntegrity.cat': Permission denied rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/Assets': Directory not empty rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/locales': Directory not empty rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libEGL.dll': Permission denied rm: cannot remove './media/mattgeek/programmi/WindowsApps/SpotifyAB.SpotifyMusic_1.112.449.0_x86__zpdnekdrzrea0/swiftshader/libGLESv2.dll': Permission denied
Commands give similar results for /media/mattgeek/WpSystems
, its subdirectories, and files.
Output Logrm -rvf /media/mattgek/programmi/WpSystem
chmod
, did your include-R
[recursive]?chmod -R 777 /media/mattgek/programmi/WindowsApps ; chown -R $(echo $USER):$(echo $USER) /media/mattgek/programmi/WindowsApps ; rm -Rf /media/mattgek/programmi/WindowsApps
should work. My next best suggestion would be to hook the drive back up to a Windows install, or boot a Windows install USB, and issue:chkdsk /x /offlinescanandfix <drive>:
chmod
andchown
: most likely they won't work.WpSystems
path is the%LocalAppData%
path where that app was allowed to save data), IIRC they contain wonky permissions to ensure the apps are sandboxed, so the quickest way to get rid of them is likely going to be booting WinPE [Windows install USB] and deleting them via CLI or via QDir within WinPE. Trying to do so while booted to Windows, versus WinPE, will likely entail more steps due to having to assign recursive ownership and full permissions prior to deletion.