2014-06-14 4 views
0

TinyCore64 시스템에 postgresql 서버를 프로비저닝하고 권한, 소유권 및 그룹을 변경 했음에도 불구하고 사용자 포스트 그레스가 액세스 할 수없는 파일 및 폴더가 있습니다. 모두. 다음은 명령과 폴더 구조입니다.리눅스 권한 문제 : "Permission denied"

sudo -u postgres ls /etc/ssl/ 
# success 
# Permissions: drwxr-xr-x 6 root root 

sudo -u postgres ls /etc/ssl/private 
# ls: cannot open directory /etc/ssl/private/: Permission denied 
# Permissions: drwxr-xr-x 2 postgres postgres 

나는 곤란합니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?

편집 :

정확한 내용을 게시했습니다.

[email protected]:~# sudo -u postgres ls -al /etc/ssl 
total 28 
drwxr-xr-x 6 root  root  4096 Jun 12 08:33 . 
drwxr-xr-x 161 root  root  4096 Jun 12 08:33 .. 
drwxr-xr-x 2 root  root  4096 Jun 12 08:33 certs 
-rw-r--r-- 1 root  root  10835 May 2 20:29 openssl.cnf 
drwxr-xr-x 2 postgres postgres 4096 Jun 12 08:33 private 
[email protected]:~# sudo -u postgres ls -al /etc/ssl/private/ 
ls: cannot open directory /etc/ssl/private/: Permission denied 

편집 "을/etc/SSL"디렉토리에

[email protected]:~# strace -f sudo -u postgres ls -al /etc/ssl/private/ 
.... 
[pid 4270] close(3)     = 0 
[pid 4270] openat(AT_FDCWD, "/etc/ssl/private/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 EACCES (Permission denied) 
[pid 4270] write(2, "ls: ", 4ls:)   = 4 
[pid 4270] write(2, "cannot open directory /etc/ssl/p"..., 39cannot open directory /etc/ssl/private/) = 39 
[pid 4270] write(2, ": Permission denied", 19: Permission denied) = 19 
[pid 4270] write(2, "\n", 1 
)   = 1 
.... 
+0

당신이 정확한 성적 증명서가 아닌 주석으로 응답을 가진 버전을 게시 할 수 :

떨어지게 같은되어야 하는가? –

+0

오케이, 방금했습니다. – picardo

+0

'strace' 명령으로'ls' 명령을 실행할 수 있습니까? 나는. 'strace -f sudo -u postgres ls -al/etc/ssl/private /'그리고'Permission denied'과 그 앞뒤에 몇 줄을 붙여라. – VolenD

답변

0

권한을 확인 - 당신의 시스템에서 '포스트 그레스'사용자가 '없는 것 같다 다음 strace의 출력을 게시

rx '권한을 대상의 전체 경로 어딘가에 배치해야합니다.

[email protected]:~$ ls -l /etc/ |grep ssl 
drwxr-xr-x 4 root root  4096 Jun 13 11:00 ssl 
[email protected]:~$ uname -a 
Linux aknb5 3.2.0-61-generic-pae #93-Ubuntu SMP Fri May 2 21:46:08 UTC 2014 i686 i686 i386 GNU/Linux 
[email protected]:~$ 
+0

나는 그것을 확인하기 위해 두 번 확인했다. 내가 깨달은 한가지는이 기계가 원래 3.13.3-tinycore64이지 우분투가 아니라는 것입니다. 이것은 사용자 지정 Vagrant 상자입니다. – picardo

관련 문제