dbTalk Databases Forums  

[BUGS] Permission denied errors

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Permission denied errors in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zeki@mokhtarzada.com
 
Posts: n/a

Default [BUGS] Permission denied errors - 08-23-2005 , 05:42 AM







Hello all, I woke up this morning and found my installation of Postgres
(7.3.2) spewing the following error message:

ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied

Now it seems as though the database is somehow diseased. I can select and
insert data in all of the other tables in the database but I can not
create tables:

# create table test_tab (idfield int);
ERROR: cannot create test_tab: Permission denied

I also can not dump data out of ev_log:

pg_dump: ERROR: cannot count blocks for ev_log -- open failed: Permission
denied
pg_dump: lost synchronization with server, resetting connection
pg_dump: SQL command to dump the contents of table "ev_log" failed:
PQendcopy() failed.
pg_dump: Error message from server: pg_dump: The command was: COPY
public.ev_log (logid, eventtype, username, ipaddress, eventdata, ts) TO
stdout;

Any ideas?

I'm willing to dump and reload, but I'd like to get the data out of the
log table if possible.

-Zeki


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Permission denied errors - 08-23-2005 , 09:21 AM






zeki (AT) mokhtarzada (DOT) com writes:
Quote:
Hello all, I woke up this morning and found my installation of Postgres
(7.3.2) spewing the following error message:

ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
Look around in the database directory. It kinda looks like one or more
files or directories had had its ownership or permissions changed so
that the server can't read it anymore.

Postgres itself would not do such a thing, so the culprit is either
administrator error or flaky disk hardware. After you fix the problem
by hand, you'll want to try to figure out which.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #3  
Old   
Zeki Mokhtarzada
 
Posts: n/a

Default Re: [BUGS] Permission denied errors - 08-24-2005 , 10:01 AM



Very interesting... We recently changed the location of the data files
using a symbolic link. Although all of the files had the correct ownership,
the new parent directory was not owned by postgres. The strange thing
is that we have been running like this for over a week, and even now,
only the log table was effected (the log table is the only table that
has a large number of data changing, most of the other tables are
relatively static). Changing the owner of the parent directory to
postgres fixed the problem.

Thanks!

-Zeki

Tom Lane wrote:

Quote:
zeki (AT) mokhtarzada (DOT) com writes:


Hello all, I woke up this morning and found my installation of Postgres
(7.3.2) spewing the following error message:





ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied
ERROR: cannot count blocks for ev_log -- open failed: Permission denied



Look around in the database directory. It kinda looks like one or more
files or directories had had its ownership or permissions changed so
that the server can't read it anymore.

Postgres itself would not do such a thing, so the culprit is either
administrator error or flaky disk hardware. After you fix the problem
by hand, you'll want to try to figure out which.

regards, tom lane



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #4  
Old   
Alvaro Herrera
 
Posts: n/a

Default Re: [BUGS] Permission denied errors - 08-24-2005 , 10:22 AM



On Tue, Aug 23, 2005 at 11:06:44AM -0400, Zeki Mokhtarzada wrote:
Quote:
Very interesting... We recently changed the location of the data files
using a symbolic link. Although all of the files had the correct ownership,
the new parent directory was not owned by postgres. The strange thing
is that we have been running like this for over a week, and even now,
only the log table was effected (the log table is the only table that
has a large number of data changing, most of the other tables are
relatively static). Changing the owner of the parent directory to
postgres fixed the problem.
Probably, this is because on other tables you do not need to create new
segments, while the ev_log table is big enough to need some.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"People get annoyed when you try to debug them." (Larry Wall)

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.