{"action":"created","issue":{"url":"https://api.github.com/repos/GNS3/gns3-server/issues/576","repository_url":"https://api.github.com/repos/GNS3/gns3-server","labels_url":"https://api.github.com/repos/GNS3/gns3-server/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/GNS3/gns3-server/issues/576/comments","events_url":"https://api.github.com/repos/GNS3/gns3-server/issues/576/events","html_url":"https://github.com/GNS3/gns3-server/issues/576","id":160372120,"number":576,"title":"Docker permission not reset, when command in docker exits","user":{"login":"ehlers","id":896406,"avatar_url":"https://avatars.githubusercontent.com/u/896406?v=3","gravatar_id":"","url":"https://api.github.com/users/ehlers","html_url":"https://github.com/ehlers","followers_url":"https://api.github.com/users/ehlers/followers","following_url":"https://api.github.com/users/ehlers/following{/other_user}","gists_url":"https://api.github.com/users/ehlers/gists{/gist_id}","starred_url":"https://api.github.com/users/ehlers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehlers/subscriptions","organizations_url":"https://api.github.com/users/ehlers/orgs","repos_url":"https://api.github.com/users/ehlers/repos","events_url":"https://api.github.com/users/ehlers/events{/privacy}","received_events_url":"https://api.github.com/users/ehlers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GNS3/gns3-server/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"noplay","id":345437,"avatar_url":"https://avatars.githubusercontent.com/u/345437?v=3","gravatar_id":"","url":"https://api.github.com/users/noplay","html_url":"https://github.com/noplay","followers_url":"https://api.github.com/users/noplay/followers","following_url":"https://api.github.com/users/noplay/following{/other_user}","gists_url":"https://api.github.com/users/noplay/gists{/gist_id}","starred_url":"https://api.github.com/users/noplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplay/subscriptions","organizations_url":"https://api.github.com/users/noplay/orgs","repos_url":"https://api.github.com/users/noplay/repos","events_url":"https://api.github.com/users/noplay/events{/privacy}","received_events_url":"https://api.github.com/users/noplay/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/GNS3/gns3-server/milestones/25","html_url":"https://github.com/GNS3/gns3-server/milestones/1.5","labels_url":"https://api.github.com/repos/GNS3/gns3-server/milestones/25/labels","id":1660887,"number":25,"title":"1.5","description":"","creator":{"login":"grossmj","id":4752614,"avatar_url":"https://avatars.githubusercontent.com/u/4752614?v=3","gravatar_id":"","url":"https://api.github.com/users/grossmj","html_url":"https://github.com/grossmj","followers_url":"https://api.github.com/users/grossmj/followers","following_url":"https://api.github.com/users/grossmj/following{/other_user}","gists_url":"https://api.github.com/users/grossmj/gists{/gist_id}","starred_url":"https://api.github.com/users/grossmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grossmj/subscriptions","organizations_url":"https://api.github.com/users/grossmj/orgs","repos_url":"https://api.github.com/users/grossmj/repos","events_url":"https://api.github.com/users/grossmj/events{/privacy}","received_events_url":"https://api.github.com/users/grossmj/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":83,"state":"open","created_at":"2016-03-22T21:55:43Z","updated_at":"2016-06-15T09:11:55Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-06-15T09:02:27Z","updated_at":"2016-06-15T09:11:55Z","closed_at":"2016-06-15T09:11:55Z","body":"GNS3 V1.5 commit https://github.com/GNS3/gns3-server/commit/e82862c69f582beb2468dc6feaa7cfe280eb4c98\r\n\r\nNormally when a docker container is halted, the permissions of the volume directories are saved and then reset to the und/gid of the gns3-server. When a docker container is not haltet by GNS3, but exits (normally or abnormally), then this save permission function can't run. The volume directories are still owned by root.\r\n\r\n```\r\ngns3@gns3vm:~/gns3-server$ ls -lt /opt/gns3/projects/e6de5e2e-58cd-4859-a8b1-cd915554d074/project-files/docker/5513293c-ca64-4c2a-886c-5ffae9f5b548/\r\ntotal 8\r\ndrwx------ 2 root root 4096 Jun 15 08:39 root/\r\ndrwxrwx--- 3 gns3 gns3 4096 Jun 15 08:39 etc/\r\n```\r\n\r\nWhen this is a temporary directory, this root owned files can't be deleted on project close and they remain as leftovers.\r\n\r\n```\r\ngns3@gns3vm:~/gns3-server$ ls -l /opt/gns3/projects/e6de5e2e-58cd-4859-a8b1-cd915554d074/project-files/docker/5513293c-ca64-4c2a-886c-5ffae9f5b548/\r\ntotal 4\r\ndrwx------ 2 root root 4096 Jun 15 08:39 root/\r\n```\r\n\r\nWhen you now stop, then start the GNS3 server it tries delete leftover temporary projects on start of the server. Because of the permission problem, this won't work. But this time this is fatal:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/gns3server\", line 9, in <module>\r\n    load_entry_point('gns3-server==1.5.0dev5', 'console_scripts', 'gns3server')()\r\n  File \"/usr/local/lib/python3.4/dist-packages/gns3_server-1.5.0dev5-py3.4.egg/gns3server/main.py\", line 72, in main\r\n    run()\r\n  File \"/usr/local/lib/python3.4/dist-packages/gns3_server-1.5.0dev5-py3.4.egg/gns3server/run.py\", line 230, in run\r\n    Project.clean_project_directory()\r\n  File \"/usr/local/lib/python3.4/dist-packages/gns3_server-1.5.0dev5-py3.4.egg/gns3server/modules/project.py\", line 437, in clean_project_directory\r\n    shutil.rmtree(path)\r\n  File \"/usr/lib/python3.4/shutil.py\", line 463, in rmtree\r\n    _rmtree_safe_fd(fd, path, onerror)\r\n  File \"/usr/lib/python3.4/shutil.py\", line 401, in _rmtree_safe_fd\r\n    _rmtree_safe_fd(dirfd, fullname, onerror)\r\n  File \"/usr/lib/python3.4/shutil.py\", line 401, in _rmtree_safe_fd\r\n    _rmtree_safe_fd(dirfd, fullname, onerror)\r\n  File \"/usr/lib/python3.4/shutil.py\", line 401, in _rmtree_safe_fd\r\n    _rmtree_safe_fd(dirfd, fullname, onerror)\r\n  File \"/usr/lib/python3.4/shutil.py\", line 397, in _rmtree_safe_fd\r\n    onerror(os.open, fullname, sys.exc_info())\r\n  File \"/usr/lib/python3.4/shutil.py\", line 395, in _rmtree_safe_fd\r\n    dirfd = os.open(name, os.O_RDONLY, dir_fd=topfd)\r\nPermissionError: [Errno 13] Permission denied: 'root'\r\n```\r\n\r\nI think It will be difficult to avoid this leftovers, but this permission error on server startup should not be fatal.\r\n"},"comment":{"url":"https://api.github.com/repos/GNS3/gns3-server/issues/comments/226131792","html_url":"https://github.com/GNS3/gns3-server/issues/576#issuecomment-226131792","issue_url":"https://api.github.com/repos/GNS3/gns3-server/issues/576","id":226131792,"user":{"login":"noplay","id":345437,"avatar_url":"https://avatars.githubusercontent.com/u/345437?v=3","gravatar_id":"","url":"https://api.github.com/users/noplay","html_url":"https://github.com/noplay","followers_url":"https://api.github.com/users/noplay/followers","following_url":"https://api.github.com/users/noplay/following{/other_user}","gists_url":"https://api.github.com/users/noplay/gists{/gist_id}","starred_url":"https://api.github.com/users/noplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noplay/subscriptions","organizations_url":"https://api.github.com/users/noplay/orgs","repos_url":"https://api.github.com/users/noplay/repos","events_url":"https://api.github.com/users/noplay/events{/privacy}","received_events_url":"https://api.github.com/users/noplay/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T09:11:55Z","updated_at":"2016-06-15T09:11:55Z","body":"Confirmed it's no longer crash"}}
{"actor":{"display_login":"noplay"}}