Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 4866A2E002C for ; Sat, 19 Apr 2008 15:51:53 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 16917-02 for ; Sat, 19 Apr 2008 15:51:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id EABEB2E003B for ; Sat, 19 Apr 2008 15:51:45 -0300 (ADT) Received: from [192.168.1.226] (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m3JIqNDj001574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 Apr 2008 11:52:24 -0700 Message-ID: <480A3F49.7080406@commandprompt.com> Date: Sat, 19 Apr 2008 11:51:53 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Graham Leggett CC: Tom Lane , pgsql-admin@postgresql.org Subject: Re: Could not create a tablespace - permission denied References: <4809EC7B.6060902@sharp.fm> <9189.1208619241@sss.pgh.pa.us> <480A12F5.5060609@sharp.fm> <9478.1208620229@sss.pgh.pa.us> <480A190B.80408@sharp.fm> <480A1A55.6090800@commandprompt.com> <480A381D.3030908@sharp.fm> In-Reply-To: <480A381D.3030908@sharp.fm> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Sat, 19 Apr 2008 11:52:25 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/205 X-Sequence-Number: 28969 Graham Leggett wrote: > Joshua D. Drake wrote: > >> I am pretty sure you are missing something. I can not reproduce your >> issue: > > Do it like this: > > - mkdir /tmp/foo > - chown user:user /tmp/foo > - edit /etc/group and add postgres to the group user Aha! there it is. Adding a user to a group doesn't mean anything until that user reinitializes the environment. That is why restarting postgresql resolves the issue. When postgresql is started, is actually launches a new shell as the user and the fact that they are part of the group is picked up. Sincerely, Joshua D. Drake