Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zpp7x-0007en-55 for pgsql-admin@arkaria.postgresql.org; Sat, 24 Oct 2015 03:04:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zpp7w-0007Fd-2n for pgsql-admin@arkaria.postgresql.org; Sat, 24 Oct 2015 03:04:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zpp7u-0007FP-Aa for pgsql-admin@postgresql.org; Sat, 24 Oct 2015 03:04:14 +0000 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zpp7m-0003BT-7o for pgsql-admin@postgresql.org; Sat, 24 Oct 2015 03:04:13 +0000 Received: by obctp1 with SMTP id tp1so80491549obc.2 for ; Fri, 23 Oct 2015 20:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=OJQ6jv+dgvYqv7/UVIJua93oHh5xnp7TBfiZ4H2IKOQ=; b=neJp+xtISKa19yN5gtyr71MYluXG3+3o87F3/XwsmvzE/2X/R5EFbz4hIOlYRT1sUV Vcwp5AFVB2UKwo21GJPYT7rLDZR8l2jrksfYavCjIzdPwo1rWgb4sBA5mzZiBqQGXBzD T6tX4KJyh0zmM0JUZstRGftk/1tk/srb4+NE9x9bEZGAKmuUs9WQstbUwNNWCeQuMRU7 BotAl8g9HeVjwr4U/pYZ+EOKg+Dqj2dapViY54oYPEbFWDcY+d1yb/faXDqIH50v7wHP KxIXfWg9xuRIfuysbdHPA9keEP6wc+spzWgAYttb2919B7NLBUulU021hX27xD14oG3P 03OQ== X-Received: by 10.182.114.167 with SMTP id jh7mr17401984obb.70.1445655843548; Fri, 23 Oct 2015 20:04:03 -0700 (PDT) Received: from [192.168.0.2] (cpe-72-182-26-34.austin.res.rr.com. [72.182.26.34]) by smtp.gmail.com with ESMTPSA id xv1sm9697445obc.10.2015.10.23.20.04.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 20:04:02 -0700 (PDT) Subject: Re: pg_basebackup Error could not open directory To: Ankur Kaushik , pgsql-admin References: From: John Scalia Message-ID: <562AF522.1020000@gmail.com> Date: Fri, 23 Oct 2015 22:04:02 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Ankur, This should be really easy to solve: 1) Who owns this backup directory 2) what is the mode of that directory, i.e., 555, 755, or what? You could simply try "chmod 777 ./backup" and then reattempt your pg_basebackup command. -- Jay On 10/23/2015 8:56 PM, Ankur Kaushik wrote: > > User created as CREATE ROLE base_backup_user REPLICATION LOGIN PASSWORD 'backupuser'; > > > -bash-4.1$ pg_basebackup -h 127.0.0.1 -U base_backup_user -D "./pgbackup" -Ft -z -P > pg_basebackup: could not get backup header: ERROR: could not open directory "./backup": Permission denied > > > Getting Below error while using pg_basebackup -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin