{"action":"opened","issue":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/5781","repository_url":"https://api.github.com/repos/jupyterlab/jupyterlab","labels_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/5781/labels{/name}","comments_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/5781/comments","events_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/5781/events","html_url":"https://github.com/jupyterlab/jupyterlab/issues/5781","id":392190531,"node_id":"MDU6SXNzdWUzOTIxOTA1MzE=","number":5781,"title":"file deletion fails: invalid cross-device link","user":{"login":"lvankampenhout","id":7933853,"node_id":"MDQ6VXNlcjc5MzM4NTM=","avatar_url":"https://avatars0.githubusercontent.com/u/7933853?v=4","gravatar_id":"","url":"https://api.github.com/users/lvankampenhout","html_url":"https://github.com/lvankampenhout","followers_url":"https://api.github.com/users/lvankampenhout/followers","following_url":"https://api.github.com/users/lvankampenhout/following{/other_user}","gists_url":"https://api.github.com/users/lvankampenhout/gists{/gist_id}","starred_url":"https://api.github.com/users/lvankampenhout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvankampenhout/subscriptions","organizations_url":"https://api.github.com/users/lvankampenhout/orgs","repos_url":"https://api.github.com/users/lvankampenhout/repos","events_url":"https://api.github.com/users/lvankampenhout/events{/privacy}","received_events_url":"https://api.github.com/users/lvankampenhout/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-18T14:50:21Z","updated_at":"2018-12-18T14:50:21Z","closed_at":null,"author_association":"NONE","body":"\r\n**Describe the bug**\r\nWhen working remotely on the [Cheyenne compute facility](https://www2.cisl.ucar.edu/resources/computational-systems/cheyenne/) I can make files but not delete them. The error message is \r\n\r\n```\r\nDelete Failed\r\nInvalid response: 500 Internal Server Error\r\n``` \r\n\r\nThe preceding question is: \r\n\r\n```\r\nAre you sure you want to permanently delete: Circulation_Temperature.ipynb?\r\n```\r\n\r\nThe console output shows:\r\n\r\n```\r\n    OSError: [Errno 18] Invalid cross-device link: (...)\r\n```\r\n\r\nSee full output below. \r\n\r\nThis may be related to the fact that the space where I'm working is a symbolic link, deep down:\r\n```\r\n$ pwd\r\n/glade/u/home/lvank/analysis/cesm2_cmip/notebooks_paper\r\n$ readlink -f .\r\n/gpfs/u/home/lvank/analysis/cesm2_cmip/notebooks_paper\r\n$ ls -l /glade/u\r\nlrwxrwxrwx 1 root root 7 Dec  4 20:45 /glade/u -> /gpfs/u\r\n```\r\n\r\n**To Reproduce**\r\nOn my workstation, I can delete files from a symbolically linked folder without problems. \r\n\r\n**Expected behavior**\r\nThe file should be deleted. \r\n\r\n**Desktop (please complete the following information):**\r\nserver:\r\n- Linux CentOS 7 ([link](https://www2.cisl.ucar.edu/resources/computational-systems/casper))\r\n- JupyterLab `0.35.4` from conda. \r\n\r\nclient: \r\n- Firefox 64 on OSX\r\n\r\n**Additional context**\r\nI wonder why the question reads: \"permanently delete\" but nevertheless tries to move the file to the Trash. This is not permanent deletion IMO. \r\n\r\n<details><summary>Command Line Output</summary>\r\nIn the terminal windows where JupyterLab is running I see this: \r\n<pre>\r\n[W 07:16:47.339 LabApp] delete /analysis/cesm2_cmip/notebooks_paper/Circulation_Temperature.ipynb\r\n[E 07:16:47.340 LabApp] Uncaught exception DELETE /api/contents/analysis/cesm2_cmip/notebooks_paper/Circulation_Temperature.ipynb?1545142607236 (10.12.202.21)\r\n    HTTPServerRequest(protocol='http', host='localhost:8889', method='DELETE', uri='/api/contents/analysis/cesm2_cmip/notebooks_paper/Circulation_Temperature.ipynb?1545142607236', version='HTTP/1.1', remote_ip='10.12.202.21')\r\n    Traceback (most recent call last):\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/tornado/web.py\", line 1592, in _execute\r\n        result = yield result\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/tornado/gen.py\", line 1133, in run\r\n        value = future.result()\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/tornado/gen.py\", line 326, in wrapper\r\n        yielded = next(result)\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/notebook/services/contents/handlers.py\", line 235, in delete\r\n        yield gen.maybe_future(cm.delete(path))\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/notebook/services/contents/manager.py\", line 279, in delete\r\n        self.delete_file(path)\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/notebook/services/contents/filemanager.py\", line 540, in delete_file\r\n        send2trash(os_path)\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/send2trash/plat_other.py\", line 192, in send2trash\r\n        trash_move(path_b, dest_trash, topdir)\r\n      File \"/glade/u/home/lvank/miniconda3/lib/python3.7/site-packages/send2trash/plat_other.py\", line 103, in trash_move\r\n        os.rename(src, op.join(filespath, destname))\r\n    OSError: [Errno 18] Invalid cross-device link: b'/gpfs/u/home/lvank/analysis/cesm2_cmip/notebooks_paper/Circulation_Temperature.ipynb' -> b'/glade/u/home/lvank/.local/share/Trash/files/Circulation_Temperature.ipynb'\r\n[W 07:16:47.341 LabApp] Unhandled error\r\n[E 07:16:47.341 LabApp] {\r\n      \"Host\": \"localhost:8889\",\r\n      \"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:64.0) Gecko/20100101 Firefox/64.0\",\r\n      \"Accept\": \"*/*\",\r\n      \"Accept-Language\": \"en-US,en;q=0.5\",\r\n      \"Accept-Encoding\": \"gzip, deflate\",\r\n      \"Referer\": \"http://localhost:8889/lab?\",\r\n      \"Authorization\": \"token fed73392a59e58a72d35391074180b19027f62d14f8d1322\",\r\n      \"Content-Type\": \"application/json\",\r\n      \"Origin\": \"http://localhost:8889\",\r\n      \"Dnt\": \"1\",\r\n      \"Connection\": \"keep-alive\",\r\n      \"Cookie\": \"username-localhost-8888=\\\"2|1:0|10:1544705686|23:username-localhost-8888|44:MDQ4NjNhMWMzN2ZhNDI2OWE3OTUyNDY0MjBhOTEwOWE=|3fea2a7b0ea9ea96686cdf32f90f97913977a4e7f789bd7862cc7bb112798319\\\"; username-localhost-8889=\\\"2|1:0|10:1545142607|23:username-localhost-8889|44:ZWI2NmRjYjJkZTRiNGQ0ZGFiMDM3MGZkMjBmNjllZDM=|83ae6b39dfd59d56b3393291e1e3a149019257cd9290023b8db55babdabeafb1\\\"; username-localhost-8890=\\\"2|1:0|10:1544623875|23:username-localhost-8890|44:YmUxMDBhYzIzMGYwNGZhNDk1NzM1NDI1ZjBiZWJmZmY=|85f390c16647fd5e89029fa1ddba60a64f333ed1a04cd89e36f84773e0a70b10\\\"; _xsrf=2|9004da89|b63cb8eb2aee10408acab12f0a79f02b|1545048934\",\r\n      \"Pragma\": \"no-cache\",\r\n      \"Cache-Control\": \"no-cache\"\r\n    }\r\n</pre>\r\n</details>\r\n"}}
{"actor":{"display_login":"lvankampenhout"}}