{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/12667","labels_url":"https://api.github.com/repos/owncloud/core/issues/12667/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/12667/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/12667/events","html_url":"https://github.com/owncloud/core/issues/12667","id":51201612,"number":12667,"title":"ownCloud unable to rename of delete files and directories with illegal characters","user":{"login":"skjelten","id":10101646,"avatar_url":"https://avatars.githubusercontent.com/u/10101646?v=3","gravatar_id":"","url":"https://api.github.com/users/skjelten","html_url":"https://github.com/skjelten","followers_url":"https://api.github.com/users/skjelten/followers","following_url":"https://api.github.com/users/skjelten/following{/other_user}","gists_url":"https://api.github.com/users/skjelten/gists{/gist_id}","starred_url":"https://api.github.com/users/skjelten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skjelten/subscriptions","organizations_url":"https://api.github.com/users/skjelten/orgs","repos_url":"https://api.github.com/users/skjelten/repos","events_url":"https://api.github.com/users/skjelten/events{/privacy}","received_events_url":"https://api.github.com/users/skjelten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-07T00:08:49Z","updated_at":"2015-02-21T01:26:27Z","closed_at":null,"body":"Hi,\r\n\r\nownCloud music app refused to sync properly. After some investigation I found out the reason for this was that some music files had illegal characters in the filename. By browsing the filesystem I could see that bash was displaying the characters with a question mark, e.g.: \"Runnin? Blue.ogg\". The ownCloud  web interface (Files) only shows the first part of the filename, e.g. \"Runnin\". I am unable to rename, edit or delete that filename. Same thing when trying to do it on dolphin via webdav.\r\nI tried to rename the folder through bash. That made owncloud automatically find the new file - but the old broken file also persists. There seems to be some trouble for ownCloud to delete the file entry form it's database. My wild guess is that the internal SQL query that ownCloud does to update deleted files is unable to do so due to a bug in the SQL sentence generation.\r\n\r\nBy renaming all the files (and directories) with illegal characters in them through bash directly on the filesystem I am able to make ownCloud access all my files, but I also now have a number of \"virtual files\" that have the old short name (such as \"Runnin\"). ownCloud only gives me an error message if I try to read, rename or delete these files. The exact error message depends on the tool I use, but with:\r\nWeb client (Files) I get: Could not rename file. Runnin could not be renamed as it has been deleted\r\nDolphin via webdav: An unexpected error (404) occurred while attempting to delete the specified file or folder.\r\n\r\nI believe this is a serious bug and that ownCloud should always be able handle all filenames - even though with a \"strange\" character. Note: I have removed the music app and verified that the music app has no impact on this issue."},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/75348240","html_url":"https://github.com/owncloud/core/issues/12667#issuecomment-75348240","issue_url":"https://api.github.com/repos/owncloud/core/issues/12667","id":75348240,"user":{"login":"skjelten","id":10101646,"avatar_url":"https://avatars.githubusercontent.com/u/10101646?v=3","gravatar_id":"","url":"https://api.github.com/users/skjelten","html_url":"https://github.com/skjelten","followers_url":"https://api.github.com/users/skjelten/followers","following_url":"https://api.github.com/users/skjelten/following{/other_user}","gists_url":"https://api.github.com/users/skjelten/gists{/gist_id}","starred_url":"https://api.github.com/users/skjelten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skjelten/subscriptions","organizations_url":"https://api.github.com/users/skjelten/orgs","repos_url":"https://api.github.com/users/skjelten/repos","events_url":"https://api.github.com/users/skjelten/events{/privacy}","received_events_url":"https://api.github.com/users/skjelten/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T01:26:27Z","updated_at":"2015-02-21T01:26:27Z","body":"Just to add a bit more information:\r\n\r\n1: Upgrading to owncloud 8.0 did not fix the problem where I am unable to delete existing files with non-ASCII characters.\r\n\r\n2: I have set my PHP configuration to UTF-8, but it makes no difference. New files with non-ASCII filenames are neither possible to open nor delete.\r\n\r\n3: Running \"occ files:scan --all\" does not fix the problem\r\n\r\n4: When trying to open a file with non-ASCII character I now get the following error message in the log file:\r\n{\"reqId\":\"a491cf05a1234055d8dd938d93aad91c\",\"remoteAddr\":\"10.0.0.3\",\"app\":\"PHP\",\"message\":\"fopen(\\/PATH_TO_OWNCLOUD\\/files\\/Musikk\\/U2\\/1997 Pop\\/broken\\/discoth): failed to open stream: No such file or directory at \\/var\\/www\\/ssl\\/owncloud\\/lib\\/private\\/files\\/storage\\/local.php#216\",\"level\":3,\"time\":\"2015-02-21T01:04:26+00:00\",\"method\":\"GET\",\"url\":\"\\/owncloud\\/index.php\\/apps\\/files\\/ajax\\/download.php?dir=%2FMusikk%2FU2%2F1997%20Pop%2Fbroken&files=discoth\"}\r\n(note: I masked the path to my owncloud installation)\r\n\r\n5: A work-around seems to be to delete the entire directory where the file with non-ASCII characters is stored. This way the file is finally gone."}}