Home > Permission Denied > Postgres Cannot Access The Server Configuration File Permission Denied

Postgres Cannot Access The Server Configuration File Permission Denied


share|improve this answer answered Mar 14 '12 at 15:55 Clodoaldo Neto 48.6k869120 Thanks a lot for your time. michaelk View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by michaelk 07-21-2014, 10:11 PM #29 Huamin Member Registered: May 2011 Posts: 505 Want to know which application is best for the job? This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. this contact form

Unfortunately, it looks like I am already doing exactly what I am supposed to -- namely, changing the SELinux policy to allow PostgreSQL to access the specific directories I need. Click Here to receive this Complete Guide absolutely free. Count trailing truths Strength check between medium size and large size GO OUT AND VOTE Total distance traveled when visiting all rational numbers move to directory that was no directory Rotate Offline #4 2010-04-20 22:33:40 fukawi2 Forum Moderator From: .vic.au Registered: 2007-09-28 Posts: 5,316 Website Re: [SOLVED] postgreSQL problems Try running:su - postgresql initdb -D /var/lib/postgres/data/ BlueHackers // privy.email // husk firewall her latest blog

Postgres Cannot Access The Server Configuration File Permission Denied

Then run psql test and you should be connected to your test database. Well, anytime you see something odd when using Linux, especially if permissions are involved, you should suspect SELinux. That certainly sounds like what I'm seeing, but I didn't see anything in Milen's link that refers to /home. –Matt Solnit Jul 1 '09 at 20:37 add a comment| Your Answer

The configuration file is for sure under /etc/postgresql/9.3/main when using apt-get. michaelk View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by michaelk 07-21-2014, 04:12 AM #27 Huamin Member Registered: May 2011 Posts: 505 With PostgreSQL, however, I did the following: Edited /etc/init.d/postgresql and changed the PGDATA and PGLOG variables to /home/pgsql/data and /home/pgsql/pgstartup.log, respectively Added a new policy record to set /home/pgsql/pgstartup.log to postgresql_log_t Turn Off Selinux all files system_u:object_r:postgresql_etc_t:s0 and policy says sesearch -A -s postgresql_t -t postgresql_etc_t Found 3 av rules: allow postgresql_t postgresql_etc_t : file { ioctl read getattr lock }; allow postgresql_t postgresql_etc_t :

BlueHackers // privy.email // husk firewall compilerAre you familiar with our Forum Rules and How To Ask Questions The Smart Way? Runuser: Warning: Cannot Change Directory To /var/lib/pgsql: Permission Denied I've spent literally days fooling with it for customers who won't turn it off. Not the answer you're looking for? I checked the contents of a bunch of the logs in the /var/log directory and references appear in several of them.I'm not familiar with SELinux (my education begins now) and this

A quick google gave me http://docs.fedoraproject.org/selinux-user-guide/f10/en-US/sect-Security-Enhanced_Linux-SELinux_Contexts_Labeling_Files-Persistent_Changes_semanage_fcontext.html semanage is one way. Disable Selinux Centos 7 Specifying the data directory in your command line should sort that out - since postgresql.conf is in the datadir. Expression evaluates numerically inside of Plot but not otherwise Why is this C++ code faster than my hand-written assembly for testing the Collatz conjecture? share|improve this answer answered Jul 29 '09 at 21:39 rev 9318 add a comment| up vote 0 down vote did u check out u r #SESTATUS [[email protected] ~]# sestatus SELinux status:

Runuser: Warning: Cannot Change Directory To /var/lib/pgsql: Permission Denied

Topics: Active | Unanswered Index ┬╗Networking, Server, and Protection ┬╗[SOLVED] postgreSQL problems Pages: 1 #1 2010-04-20 07:29:21 skazhy Member From: Riga, Latvia Registered: 2009-07-01 Posts: 46 [SOLVED] postgreSQL problems Hi!I have I disabled it and was well. Postgres Cannot Access The Server Configuration File Permission Denied In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter By subscribing, you agree to the privacy policy and terms Could Not Open File Pg_version Permission Denied restevns Linux - Newbie 3 10-21-2010 12:26 AM Sound Card problem(every time i install linux i have diffirent hardware problem) jacka1l Linux - Newbie 7 08-11-2005 07:10 AM Lan configuration problem

to postgresql_db_t Ran restorecon -R /home/pgsql to assign the labels At this point, I still cannot start PostgreSQL. weblink It is horrid. I made sure all the permissions are correct (600 for files and 700 for directories), as well as the ownership (postgres:postgres). Offline #3 2010-04-20 09:11:09 skazhy Member From: Riga, Latvia Registered: 2009-07-01 Posts: 46 Re: [SOLVED] postgreSQL problems postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory postgres Var Lib Pgsql Data Is Missing

You can see what happens if you start it manually. share|improve this answer answered Jun 29 '09 at 9:49 Milen A. April 6, 2010 at 2:49:00 PM EDT callcenter said... navigate here There is no postgresql process and when I run /etc/postgresql stop it says pg_ctl: PID file "var/lib/postgres/data/postmaster.pid" does not existIs server running? [FAIL].

more hot questions question feed lang-sql about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Centos Disable Selinux you may find this question helpful: http://serverfault.com/questions/110154/whats-the-default-superuser-username-password-for-postgres-after-a-new-install share|improve this answer answered Sep 5 '14 at 14:49 nyxz 1,64132042 add a comment| Your Answer draft saved draft discarded Sign up or Registration is quick, simple and absolutely free.

LinuxQuestions.org > Forums > Linux Forums > Linux - Software [SOLVED] Problem got User Name Remember Me?

It's just because I forgot to run it properly before use. I edited the /etc/selinux/config file and changed the SELINUX variable value from "enforcing" to "permissive". (This is a non-production server not visible to the outside world).I'll change this value back to Query for highest version Reverse a hexadecimal number in bash On 1941 Dec 7, could Japan have destroyed the Panama Canal instead of Pearl Harbor in a surprise attack? Chown Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap - Main Menu Linux Forum Android Forum Chrome OS Forum Search LQ

What is the OS? –Clodoaldo Neto Mar 14 '12 at 16:14 FYI : I am under RedHat Enterprise Linux WS Release 4 –Fred FLECHE Mar 14 '12 at 16:14 EDIT: The reason my question specifically mentions the /home directory is that if I go through all these steps for any other directory, e.g. /var/lib/pgsql2 or /usr/local/pgsql, then it works as Why are password boxes always blanked out when other sensitive data isn't? http://homeshareware.com/permission-denied/cannot-stat-permission-denied-git.html Teenage daughter refusing to go to school Is there a word for turning something into a competition?

Cause I am starting to be crazy after one afternoon browsing the web without no clue. –Fred FLECHE Mar 14 '12 at 16:11 @Fred Given the file path I Why is (a % 256) different than (a & 0xFF)? There are a few of these - Google these - but they're not necessary if you specify paths yourself. Find More Posts by astrogeek View Blog 07-19-2014, 03:30 AM #17 Huamin Member Registered: May 2011 Posts: 505 Original Poster Rep: Many thanks.

Lets try a shutdown and restart of the postgres server and see if that generates a visibly current change in the log. This command works fine: $ sudo service postgresql initdb This command fails: $ sudo service postgresql start Log output of failure shows no issues when I run this command: $ cat I tried to run the postmaster, but it couldn't find data files.How can I fix this?Thanks in advance,-skazhy Last edited by skazhy (2010-04-21 05:27:46) Offline #2 2010-04-20 09:01:31 fukawi2 Forum Moderator It looks like something is missing in the installation.

Operator ASCII art I changed one method signature and broke 25,000 other classes. Join them; it only takes a minute: Sign up Starting PostgreSQL server failed after modification of postgresql.conf using the sudo command up vote 4 down vote favorite I wanted to change Run this command to manually start the server: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start share|improve this answer edited Dec 30 '14 at 20:54 Willem Van Onsem 1234 answered Aug 28 '14 From source, I've never had an issue with this.

asked 4 years ago viewed 5562 times active 2 years ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Get the weekly newsletter! In that case check /var/log/messages for pre auditd log messages) Try and see what SELinux might be complaining about tail -f /var/log/audit/audit.log or to look just for denials tail -f /var/log/audit/audit.log The time now is 10:37 AM.

Back to Top