1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add pg_upgrade check to make sure the user has full access permission in

the current directory;  if not, throw an error.
This commit is contained in:
Bruce Momjian
2011-05-16 11:01:29 -04:00
parent 6c19bd96bc
commit bda27e502f
2 changed files with 5 additions and 4 deletions

View File

@ -93,6 +93,11 @@ is_server_running(const char *datadir)
void
verify_directories(void)
{
if (access(".", R_OK | W_OK | X_OK) != 0)
pg_log(PG_FATAL,
"You must have full access permissions in the current directory.\n");
prep_status("Checking old data directory (%s)", old_cluster.pgdata);
check_data_dir(old_cluster.pgdata);
check_ok();