{"action":"created","issue":{"url":"https://api.github.com/repos/mholt/caddy/issues/1565","repository_url":"https://api.github.com/repos/mholt/caddy","labels_url":"https://api.github.com/repos/mholt/caddy/issues/1565/labels{/name}","comments_url":"https://api.github.com/repos/mholt/caddy/issues/1565/comments","events_url":"https://api.github.com/repos/mholt/caddy/issues/1565/events","html_url":"https://github.com/mholt/caddy/issues/1565","id":220045426,"number":1565,"title":"Caddy tries to mkdir . (why?), but permission denied","user":{"login":"coolaj86","id":122831,"avatar_url":"https://avatars0.githubusercontent.com/u/122831?v=3","gravatar_id":"","url":"https://api.github.com/users/coolaj86","html_url":"https://github.com/coolaj86","followers_url":"https://api.github.com/users/coolaj86/followers","following_url":"https://api.github.com/users/coolaj86/following{/other_user}","gists_url":"https://api.github.com/users/coolaj86/gists{/gist_id}","starred_url":"https://api.github.com/users/coolaj86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolaj86/subscriptions","organizations_url":"https://api.github.com/users/coolaj86/orgs","repos_url":"https://api.github.com/users/coolaj86/repos","events_url":"https://api.github.com/users/coolaj86/events{/privacy}","received_events_url":"https://api.github.com/users/coolaj86/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-04-06T21:57:01Z","updated_at":"2017-04-10T05:07:53Z","closed_at":"2017-04-07T07:09:46Z","body":"Caddy v0.9.5\r\n\r\nI was debugging the infamous systemd script that everyone seems to want so that, y'know, caddy would be easier to use and install (but that the maintainers seem to actively disavow and lock issues and throw people off to the never ending stream of forum posts)... only to find that one of the bugs may actually reside in caddy itself.\r\n\r\n```\r\nroot@proxy-dev:~# sudo -u www-data CADDYPATH=/etc/ssl/caddy /usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp\r\nActivating privacy features...2017/04/06 21:47:13 [WARNING] Stapling OCSP: no OCSP stapling for [test.example.com]: ocsp: error from server: unauthorized\r\n done.\r\n2017/04/06 21:47:13 mkdir .: permission denied\r\n```\r\n\r\nIf I change into any directory where the user running caddy has permissions to write, it seems to work without the `permission denied` error. In system scripts the default directory is `/`... hence so many troubles.\r\n\r\nWhy is it trying to create the current directory?\r\n\r\nUpdate: Solutions\r\n-------\r\n\r\nThis patch works for me: https://github.com/coolaj86/caddy/commit/254156941df8561389954aac114208b3ad6722b8\r\n\r\n* PAM error is caused by bursts of failing and restarting, waiting a minute or two will solve the rate-limit\r\n* networkd error... not sure, but a reboot seems to fix it \r\n* bind error is caused by the CAP stuff being commented out\r\n* perms error is caused if `/etc/ssl/caddy` or any sub directories have the wrong owner or permission"},"comment":{"url":"https://api.github.com/repos/mholt/caddy/issues/comments/292850910","html_url":"https://github.com/mholt/caddy/issues/1565#issuecomment-292850910","issue_url":"https://api.github.com/repos/mholt/caddy/issues/1565","id":292850910,"user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars1.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"created_at":"2017-04-10T05:07:53Z","updated_at":"2017-04-10T05:07:53Z","body":"@coolaj86 \r\n\r\n> mkdir .: permission denied is somewhat ambiguous.\r\n\r\nI wish I could change that, but that's just the error returned from the `os` package, and that error I believe originates from the system call. Still, to try to improve on it, I do have long-term plans to elaborate on error messages based on context (with translations to other languages) but probably not before 1.0.\r\n\r\nI second @wmark's sentiment:\r\n> We care. Reviewed PR's are testament to this. See you there!\r\n\r\nWe're trying to make the project the best we can, so I appreciate your feedback AJ. I'm hoping the init scripts in this repo is a temporary solution only."}}
{"actor":{"display_login":"mholt"}}