473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Rights in 7.4

Recently switched to 7.4.1 and noticed that there are now several schemas
besides public. In addition even if I create the database with
AUTHORIZATION to a particular user the schemas are owned by the superuser.
This is a problem with restores. In particular with restoring sequences.
How does one now create a database and make sure that everything inside is
owned by a particular user?

For the public schema I just dropped it and then recreated and gave a
particular user ownership, but pg_catalog has many tables and I could not
do the same procedure.

The line from the sql file that is failing, a dump, is
SELECT pg_catalog.setval('invoicesdetails_invoicesdetails id_seq', 18,
true);
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #1
4 1157
Francisco Reyes <li***@natserv.com> writes:
How does one now create a database and make sure that everything inside is
owned by a particular user?
System objects are not, and should not be, owned by any nonprivileged
user. I fail to see what your complaint is.
The line from the sql file that is failing, a dump, is
SELECT pg_catalog.setval('invoicesdetails_invoicesdetails id_seq', 18,
true);


You have not given us any context to interpret this report in, but
I do not think it has anything to do with the ownership of the public
schema.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #2
On Wed, 14 Jan 2004, Tom Lane wrote:
The line from the sql file that is failing, a dump, is
SELECT pg_catalog.setval('invoicesdetails_invoicesdetails id_seq', 18,
true);


You have not given us any context to interpret this report in, but
I do not think it has anything to do with the ownership of the public
schema.

I need to dump/restore frequently from one database/machine to other
database/machines.

I did the dump as a regular user and was trying to do the restore as the
same user, but to another DB. Both DBs are owned by the user I did the
dump with.

Should restores be always done by the super user?

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #3
Francisco Reyes <li***@natserv.com> writes:
Should restores be always done by the super user?


If every object in the dump is owned by the same nonprivileged user,
it will work to restore as that user. You can also use --no-owner
to get the same effect (everything winds up owned by the user running
restore). If you are trying to copy a database that includes objects
of varying ownership, though, you gotta start as superuser.

Now that I think about it, the standard dump sequence will attempt to
set permissions and comment on the public schema, which will fail if
you're not superuser. But it should be okay to ignore those errors.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #4
On Wed, 14 Jan 2004, Tom Lane wrote:
Francisco Reyes <li***@natserv.com> writes:
Should restores be always done by the super user?
If every object in the dump is owned by the same nonprivileged user,
it will work to restore as that user.


They should all be owned by the user. I did the restore to the source DB
with that user.
You can also use --no-owner to get the same effect
That didn't help.
Before I wrote to the list I searched archived and tried the following
line options:
--no-privileges --no-owner --no-reconnect
Now that I think about it, the standard dump sequence will attempt to
set permissions and comment on the public schema, which will fail if
you're not superuser. But it should be okay to ignore those errors.


Before I tried the options above it also complained about an error to the
public schema, but that did not happen with the options above, however it
still had problems trying to set one sequence. I ended up doing that one
sequence with the superuser. Perhaps somehow I created that one sequence
with the superuser, but shouldn't the options above fix that case?

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: PeterFI | last post by:
Hello, my problem is as follows, I have a web page where user can upload pictures to unix server from his own computer. Pictures are uploaded fine, but the rights of those files are not...
1
by: Chris_M | last post by:
I have a basic question regarding rights. What level of rights do I have to have to grant another user update rights? I don't want to give everyone owner rights. Can a person with update rights...
3
by: jean-dot-paul-at-opelwilly-dot-com | last post by:
Hello all, I have two different applications where my application wants to do something the logged user has not the rights to: 1) Change a HKEY_LOCAL_MACHINE key value. The user has only...
0
by: Steve | last post by:
Greetings, I'm having problems with the use of an Access 2003 Add-In on Windows XP Pro. Administrative-level users have no problems running the Add-In, but those users with restricted rights on...
3
by: LW | last post by:
"Consider the U.S. government's recognition and protection of intellectual property in the computer industry. Inventors of computer hardware were able to patent their inventions, and the government...
10
by: KarlM | last post by:
Hallo! Due to the help in this Newgroups I am now able to set basic rights to a Computer account in active directory. The following c#-Code works fine...
1
by: Thomas Strauss, SRS | last post by:
Hi, I have a really hard time to find the access rights required for monitoring a printing queue or share in windows XP or Win2000/2003 server. We have an application that will remote control...
2
by: Jassim Rahma | last post by:
I have an application in C# and I want to assign rights based on the user login. I have users table in the database and I wnat to know what is the best way to manage the user rights?
3
by: Koliber (js) | last post by:
sorry for my bad english when I fire up (from my c# code) a standard "file - save as " dialog, and when chosen location is a shered local network directory, where I do have rights to create...
7
by: buzzluck68 | last post by:
Hello, I have an in house application that we developed, but everyone who needs to use the program are not allowed to be local admins on their PCs. I was wondering if there was a way to code...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.