{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/issues/65","repository_url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver","labels_url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/issues/65/comments","events_url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/issues/65/events","html_url":"https://github.com/Azure/azurefile-dockervolumedriver/issues/65","id":177393190,"number":65,"title":"Containers \"chown\"ing files in Azure File Storage","user":{"login":"williamayerst","id":11176822,"avatar_url":"https://avatars.githubusercontent.com/u/11176822?v=3","gravatar_id":"","url":"https://api.github.com/users/williamayerst","html_url":"https://github.com/williamayerst","followers_url":"https://api.github.com/users/williamayerst/followers","following_url":"https://api.github.com/users/williamayerst/following{/other_user}","gists_url":"https://api.github.com/users/williamayerst/gists{/gist_id}","starred_url":"https://api.github.com/users/williamayerst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamayerst/subscriptions","organizations_url":"https://api.github.com/users/williamayerst/orgs","repos_url":"https://api.github.com/users/williamayerst/repos","events_url":"https://api.github.com/users/williamayerst/events{/privacy}","received_events_url":"https://api.github.com/users/williamayerst/received_events","type":"User","site_admin":false},"labels":[{"id":264451439,"url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-16T10:31:16Z","updated_at":"2016-12-14T18:47:26Z","closed_at":null,"body":"The Postgresql container (https://hub.docker.com/_/postgres/) runs a script on start which attempts to own its data folder, and this fails:\n\n```\nThe files belonging to this database system will be owned by user \"postgres\".\nThis user must also own the server process.\n\nThe database cluster will be initialized with locale \"en_US.utf8\".\nThe default database encoding has accordingly been set to \"UTF8\".\nThe default text search configuration will be set to \"english\".\n\nData page checksums are disabled.\n\ninitdb: could not change permissions of directory \"/var/lib/postgresql/data\": Operation not permitted\nfixing permissions on existing directory /var/lib/postgresql/data ...\n```\n\nI am mounting the Azure file storage location to /var/lib/postgresql/data as below:\n\n```\nservices:\n  db:\n    ...\n    volumes:\n      - postgresql:/var/lib/postgresql/data\n    ...\nvolumes:\n  postgresql:\n    driver: azurefile\n    driver_opts:\n      share: \"postgresql\"\n\n```\n\nI have tried creating a remotepath \"data\" and it makes no difference. I take it this is because the storage driver can't interpret that call, is there a workaround? \n"},"comment":{"url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/issues/comments/267120039","html_url":"https://github.com/Azure/azurefile-dockervolumedriver/issues/65#issuecomment-267120039","issue_url":"https://api.github.com/repos/Azure/azurefile-dockervolumedriver/issues/65","id":267120039,"user":{"login":"spiderhc","id":10280381,"avatar_url":"https://avatars.githubusercontent.com/u/10280381?v=3","gravatar_id":"","url":"https://api.github.com/users/spiderhc","html_url":"https://github.com/spiderhc","followers_url":"https://api.github.com/users/spiderhc/followers","following_url":"https://api.github.com/users/spiderhc/following{/other_user}","gists_url":"https://api.github.com/users/spiderhc/gists{/gist_id}","starred_url":"https://api.github.com/users/spiderhc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiderhc/subscriptions","organizations_url":"https://api.github.com/users/spiderhc/orgs","repos_url":"https://api.github.com/users/spiderhc/repos","events_url":"https://api.github.com/users/spiderhc/events{/privacy}","received_events_url":"https://api.github.com/users/spiderhc/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T18:47:26Z","updated_at":"2016-12-14T18:47:26Z","body":"@ahmetalpbalkan About your commentary:\r\n\r\n> I am guessing SMB protocol does not allow you do chmod/chown. This is why you're getting the Operation not permitted error.\r\n\r\nI have the same problem here, seems this error happens because of this line in docker postgres image:\r\n[https://github.com/docker-library/postgres/blob/a00e979002aaa80840d58a5f8cc541342e06788f/docker-entrypoint.sh#L32](https://github.com/docker-library/postgres/blob/a00e979002aaa80840d58a5f8cc541342e06788f/docker-entrypoint.sh#L32)\r\n\r\nAs this command is not successful, the database is not written to directory.\r\n\r\nDo you know a workaround for this?\r\n\r\nI also tried with (the problem persists):\r\n\r\n- -o uid=999 -o gid=999 -o dirmode=0777 -o filemode=0777"}}
{"actor":{"display_login":"spiderhc"}}