Skip to content

Instantly share code, notes, and snippets.

@danhixon
Created February 10, 2014 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danhixon/8925440 to your computer and use it in GitHub Desktop.
Save danhixon/8925440 to your computer and use it in GitHub Desktop.
getting permission denied for user even though I should have read access.
postgres@e000d37cf793:/$ groups
postgres ssl-cert
postgres@e000d37cf793:/$ ls -la /etc/ssl/
total 28
drwxr-xr-x 7 root root 4096 Feb 10 20:40 .
drwxr-xr-x 95 root root 4096 Feb 10 20:44 ..
drwxr-xr-x 2 root root 4096 Feb 10 20:40 certs
-rw-r--r-- 1 root root 10835 Jan 8 20:48 openssl.cnf
drwxr-x--- 2 root ssl-cert 4096 Feb 10 20:40 private
postgres@e000d37cf793:/$ ls -la /etc/ssl/private/
ls: cannot open directory /etc/ssl/private/: Permission denied
@danhixon
Copy link
Author

  1. I am a member of the 'ssl-cert' group
  2. The ssl-cert group has read and directory listing access of /etc/ssl/private
  3. Permission denied when I try to list the contents of the /etc/ssl/private directly.

Any idea why? What I could try? I've tried (just for kicks) chmod 777 and it still doesn't let me access it.

@danhixon
Copy link
Author

if anyone finds this someday may they know that I never did figure out why the file was inaccessible but what I did was copy the file to another location and assign the same permissions to it and told postgresql where it was located in the conf file.

@mjuszczak
Copy link

I am having this same issue. Glad I found this! It's been driving me crazy. Seems to only be in the docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment