Tôi muốn thay đổi tham số "shared_buffers" trong tệp postgresql.conf của mình.Khởi động máy chủ PostgreSQL không thành công sau khi sửa đổi postgresql.conf bằng lệnh sudo
Vấn đề là tôi đã sử dụng lệnh sudo và nó đã cấp quyền sở hữu cho thư mục gốc.
-rw-rw-rw- 1 root root 13661 Mar 14 15:36 postgresql.conf
Sau đó, tôi sử dụng lệnh sau để lấy lại quyền sở hữu cho bưu điện:
sudo chown postgres:postgres /var/lib/pgsql/data/postgresql.conf
Vì vậy, tôi đã thử các lệnh:
postgres -D /var/lib/pgsql/data
tôi đã nặng ngạc nhiên khi vẫn nhận được như sau thông báo lỗi
postgres cannot access the server configuration file "/var/lib/pgsql/data/postgresql.conf": Permission denied
dưới id kết quả của "ls" lệnh trong thư mục realted đến PostgreSQL:
sudo ls -l /var/lib/pgsql/data/
total 208
drwx------ 19 postgres postgres 4096 Mar 13 17:23 base
drwx------ 2 postgres postgres 4096 Mar 14 14:30 global
drwx------ 2 postgres postgres 4096 Mar 5 14:26 pg_clog
-rw------- 1 postgres postgres 3365 Mar 1 2006 pg_hba.conf
-rw------- 1 postgres postgres 3182 Mar 1 2006 pg_hba.conf.old
-rw------- 1 postgres postgres 1460 Feb 24 2006 pg_ident.conf
drwx------ 2 postgres postgres 139264 Mar 14 00:00 pg_log
drwx------ 4 postgres postgres 4096 Feb 24 2006 pg_multixact
drwx------ 2 postgres postgres 4096 Mar 14 10:42 pg_subtrans
drwx------ 2 postgres postgres 4096 Feb 24 2006 pg_tblspc
drwx------ 2 postgres postgres 4096 Feb 24 2006 pg_twophase
-rw------- 1 postgres postgres 4 Feb 24 2006 PG_VERSION
drwx------ 3 postgres postgres 4096 Mar 14 14:30 pg_xlog
-rw-rw-rw- 1 postgres postgres 13661 Mar 14 15:36 postgresql.conf
-rw------- 1 postgres postgres 49 Jan 2 17:15 postmaster.opts
Nếu ai đó có một ý tưởng về có thể là cách để khắc phục vấn đề này.
Xin cảm ơn trước.
Fred
Cảm ơn bạn rất nhiều vì đã dành thời gian. Tôi nhận được "bash: sestatus: lệnh không tìm thấy". Bạn có gợi ý nào khác không? Vì tôi bắt đầu phát điên sau một buổi chiều duyệt web mà không có đầu mối. –
@Fred Cho đường dẫn tập tin tôi nghĩ bạn đang sử dụng một hệ điều hành có nguồn gốc RedHat. Hệ điều hành là gì? –
FYI: Tôi thuộc RedHat Enterprise Linux WS Bản phát hành 4 –