Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail From: "Laurenz Albe" Newsgroups: comp.databases.postgresql References: Subject: Re: PostgreSQL 9.0 in Ubuntu Linux Date: Mon, 22 Aug 2011 10:51:13 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Organization: MagistratWien newsserver Message-Id: <1314003094.239215@proxy.dienste.wien.at> X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Lines: 39 NNTP-Posting-Host: 141.203.254.23 X-Trace: 1314003098 aconews.univie.ac.at 38260 141.203.254.23 X-Complaints-To: abuse@univie.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.databases.postgresql:212 gargoyle60 wrote: >>> psql:/home/gary/PostgreSQL/9.0/data/gjd_data/Z_Build_DB_Linux.sql:48: >>> ERROR: could not set permissions on directory >>> "/home/gary/PostgreSQL/9.0/ data/gjd_data/gjd_sentinel_data": Permission >>> denied ... >> Therein lies the problem. > I forgot to show the statment that is causing the problem: > CREATE TABLESPACE sentinel_data > OWNER sentinel > LOCATION E'/home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data'; > > From my directory listing I can see that the permissions for gjd_sentinel_data are drwxrwxrwx with > owner/group of postgres. On that basis I can't see why there is the problem. > > I am wondering if it has something to do with the psql process running as, or owned by, user > postgres? That error message is issued when chmod(2) fails. You can try to do the same thing from the command line to investigate the cause of the error: Become user postgres (or the user under which the PostgreSQL processes tun), then try chmod 0700 /home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data That should fail. What do you get for "ls -ld /home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data" when you run it as user postgres? Yours, Laurenz Albe