[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Wierd problem with postgresql



On Sat, 2005-09-17 at 09:14 -0700, Linuxer Wang wrote:
> Hello, all
> 
> I am using Fedora Core 4 and the pre-installed postgresql 8.0.3.
> 
> I don't want to lost my data when I reinstall fedora next time, so I
> decide to create a new database under /opt.
> So I changed the service startup script /etc/init.d/postgresql, and it
> successfully init the database and ran well.
> But after reboot the system, I found the service startup failed. The
> error message is "postmaster cannot access
> the server configuration file "/var/lib/pgsql/data/postgresql.conf"
> Permission denied. And after the system start and
> login with root, the command "service postgresql start" can succeed.
> 
> I also did the following test:
> Disable the postgresql service, and put a line to /etc/rc.local:
> runuser -l postgres -c "/usr/bin/postmaster -D /opt/postgresql/data &"
> 
> When the system reboot, it failed to startup again, and the error
> message is the same. But after login with root,
> the above command can be successfully executed.
> 
> Can anyone give me some hint to this problem?
> 
Probably not a weird issue at all.  You created the new database and
have run the server as root. Permissions likely prevent it from running
as postgres.

Check the ownership/permissions of the /var/lib/pgsql tree (On mine that
directory is postgres:postgres with 0700 permissions) and make sure the
new tree all the way down is the same so it can run as postgres.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]