Обсуждение: Cannot Create a TableSpace on Windows XP Service Pack 2

Поиск
Список
Период
Сортировка

Cannot Create a TableSpace on Windows XP Service Pack 2

От
"Jose Flores"
Дата:
Windows XP SP2 came with a lot of security patchs.
Something was changed on the way folders are managed, i don't know what.
 
Using pgAdmin III 1.2 RC2, when i want to create a Table Space with:
CREATE TABLESPACE "TestTS" LOCATION 'E:\\Proyecto2005\\Databases';
i have the following error:
ERROR: Could not set permissions on directory "E:/proyecto2005/Databases
 
User i currently has on WinXP belongs to administrators group, so i must not have problems creating folders or files anywhere.
Yesterday i've installed PostgreSQL 8 beta 5 without problems and i see two tablespaces pg_default and pg_global
 
Please, How can i do to solve this?
I need to test PostgreSQL 8 beta 5
 
Thank you.
Jose Flores
 

Re: Cannot Create a TableSpace on Windows XP Service Pack 2

От
"Dave Page"
Дата:
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Jose Flores
Sent: 04 December 2004 12:10
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Cannot Create a TableSpace on Windows XP Service Pack 2

Windows XP SP2 came with a lot of security patchs.
Something was changed on the way folders are managed, i don't know what.
 
Using pgAdmin III 1.2 RC2, when i want to create a Table Space with:
CREATE TABLESPACE "TestTS" LOCATION 'E:\\Proyecto2005\\Databases';
i have the following error:
ERROR: Could not set permissions on directory "E:/proyecto2005/Databases
 
User i currently has on WinXP belongs to administrators group, so i must not have problems creating folders or files anywhere.
Yesterday i've installed PostgreSQL 8 beta 5 without problems and i see two tablespaces pg_default and pg_global
 
Hi,
 
This is more of a PostgreSQL issue than pgAdmin, but, although the user you are running as has permission to create the required directory, it is not you that is actually doing it - the server is doing it on your behalf. Because the server runs under a user account without admin privileges (it won't even start with them), perhaps that user doesn't have the required rights?
 
So, the quick fix is to make sure your postgres user (or whatever you called it) has permission to write to the target directory.
 
Regards, Dave

Re: Cannot Create a TableSpace on Windows XP Service Pack 2

От
"Jose Flores"
Дата:
Thank you Dave,
I understand know, winxp sp2 allow all users to work on a predefined shared folder
 
for example this works fine:
CREATE TABLESPACE "tspgTest" LOCATION 'C:\\Documents and Settings\\All Users\\Documentos\\Databases';
 
for test purpouses only i assigned "postgres" user (in my case the user who starts PostgreSQL Database Server) to Administrators group but, then as you say, the service didn't start.
 
This is not postgres problem but i cannot find a place to assign "total control" or "write" access to user "postgres" to a specific folder. I don't remember if i can do it on windows xp sp1, but this means that all people that have win xp sp2 can create databases on default table spaces only; or can create tablespaces only on a shared folder (common place to all users who can write, delete, etc).
Later if i find something about this it i will post a message.
 
sorry if i don't write english well, but there is no other way to be up to date (actualizado).
Thanks
 
José
----- Original Message -----
From: Dave Page
Sent: Saturday, December 04, 2004 8:10 AM
Subject: Re: [pgadmin-support] Cannot Create a TableSpace on Windows XP Service Pack 2

 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Jose Flores
Sent: 04 December 2004 12:10
To: pgadmin-support@postgresqlorg
Subject: [pgadmin-support] Cannot Create a TableSpace on Windows XP Service Pack 2

Windows XP SP2 came with a lot of security patchs.
Something was changed on the way folders are managed, i don't know what.
 
Using pgAdmin III 1.2 RC2, when i want to create a Table Space with:
CREATE TABLESPACE "TestTS" LOCATION 'E:\\Proyecto2005\\Databases';
i have the following error:
ERROR: Could not set permissions on directory "E:/proyecto2005/Databases
 
User i currently has on WinXP belongs to administrators group, so i must not have problems creating folders or files anywhere.
Yesterday i've installed PostgreSQL 8 beta 5 without problems and i see two tablespaces pg_default and pg_global
 
Hi,
 
This is more of a PostgreSQL issue than pgAdmin, but, although the user you are running as has permission to create the required directory, it is not you that is actually doing it - the server is doing it on your behalf. Because the server runs under a user account without admin privileges (it won't even start with them), perhaps that user doesn't have the required rights?
 
So, the quick fix is to make sure your postgres user (or whatever you called it) has permission to write to the target directory.
 
Regards, Dave

Re: Cannot Create a TableSpace on Windows XP

От
"Tino Didriksen"
Дата:
Jose Flores said:
> This is not postgres problem but i cannot find a place to assign "total
> control" or "write" access to user "postgres" to a specific folder. I
> don't remember if i can do it on windows xp sp1, but this means that all
> people that have win xp sp2 can create databases on default table spaces
> only; or can create tablespaces only on a shared folder (common place to
> all users who can write, delete, etc).

You have to disable Simple File Sharing in order to get ACL access.
http://www.practicallynetworked.com/sharing/xp_filesharing/01disablesimplesharing.htm
has the steps:
  1. Click Start | My Computer | Tools | Folder Options | View.  2. Scroll to the bottom of the list of advanced
settingsand un-check
 
Use Simple File Sharing (Recommended).  3. Click OK.

-- Tino Didriksen / Project JJ


Re: Cannot Create a TableSpace on Windows XP Service Pack 2

От
"Dave Page"
Дата:
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Jose Flores
Sent: 04 December 2004 14:54
To: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Cannot Create a TableSpace on Windows XP Service Pack 2
 
This is not postgres problem but i cannot find a place to assign "total control" or "write" access to user "postgres" to a specific folder. I don't remember if i can do it on windows xp sp1, but this means that all people that have win xp sp2 can create databases on default table spaces only; or can create tablespaces only on a shared folder (common place to all users who can write, delete, etc).
Later if i find something about this it i will post a message.
 
 
If you're on XP Pro, then you should be able to modify the security on the folder by using the Security tab on the properties page for the folder. Failing that, try using cacls.exe which should be on any XP machine.
 
Regards, Dave.