Opened 10 years ago
Last modified 3 years ago
#43944 assigned defect
postgresql91-server @9.1.13_0 changes groups of all users
Reported by: | dcabrilo@… | Owned by: | jyrkiwahlstedt |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.0 |
Keywords: | Cc: | cooljeanius (Eric Gallager) | |
Port: | postgresql91-server |
Description
Hello,
As soon as I installed postgresql91-server, all files belonging to any (human) users on my OS X installation moved to group postgres. So, before install postgresql91-server, I got this for ls -alh /Users/
drwxr-xr-x+ 17 Jelena staff 578B Jan 5 10:26 Jelena drwxrwxrwt 10 root wheel 340B Apr 16 09:33 Shared drwxr-xr-x+ 110 cabrilo staff 3.7K Jun 7 14:39 cabrilo
After I installed postgresql91-server, this looked like:
drwxr-xr-x+ 17 Jelena postgres 578B Jan 5 10:26 Jelena drwxrwxrwt 10 root wheel 340B Apr 16 09:33 Shared drwxr-xr-x+ 110 cabrilo postgres 3.7K Jun 7 14:39 cabrilo
Also, all enclosing files and directories in /Users/Jelena and /Users/cabrilo got postgres group.
I don't know much about system administration on OS X, so I can't figure out to which group users belong, etc. but please let me know if I can help in any way.
Change History (5)
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 follow-up: 4 Changed 10 years ago by dcabrilo@…
Thanks for the reply.
I didn't move the disk, no. I installed postgresql91-server, then noticed the file group problem (without restarting or logging out). I went into panic mode and recovered from Time Machine before this installation and everything was fine. It's worth mentioning that I installed postgresql server months or years before and uninstalled without any problems.
After I recovered from Time Machine, macports were not usable (some missing libraries), so I reinstalled them all. I tried to install postgresql91-server again, and the same group thing happened. I started manually chgrp-ing some directories, and when I uninstalled postgresql91-server everything was back to normal.
Any idea on how I could replicate this? How can I see what "MacPorts add_users procedure" is doing exactly, so I can try only those commands? This might as well be a bug with OS X.
comment:3 Changed 8 years ago by mf2k (Frank Schima)
Keywords: | postgres group removed |
---|---|
Owner: | changed from macports-tickets@… to jyrkiwahlstedt |
Status: | new → assigned |
comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to dcabrilo@…:
I didn't move the disk, no. I installed postgresql91-server, then noticed the file group problem (without restarting or logging out). I went into panic mode and recovered from Time Machine before this installation and everything was fine. It's worth mentioning that I installed postgresql server months or years before and uninstalled without any problems.
When you previously installed postgresql server, was it with MacPorts? Or some other way? Because if it was with MacPorts, the postgres
user and group would have been created by MacPorts at that time. If it was some other way, I can't predict what it would have done or what users or groups it would have created with what values.
After I recovered from Time Machine, macports were not usable (some missing libraries), so I reinstalled them all. I tried to install postgresql91-server again, and the same group thing happened. I started manually chgrp-ing some directories, and when I uninstalled postgresql91-server everything was back to normal.
I don't see how uninstalling a port could fix this. MacPorts doesn't contain any code to remove a user or group once it's been created.
Any idea on how I could replicate this? How can I see what "MacPorts add_users procedure" is doing exactly, so I can try only those commands? This might as well be a bug with OS X.
Search browser:macports-base/src/port1.0/portutil.tcl for port adduser
and proc addgroup
.
comment:5 Changed 3 years ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
The postgresql91-server port just uses the MacPorts
add_users
procedure, which lets ports add users and group. Ports don't get to specify ids; MacPorts should just pick the next free user or group id.Were the before and after listings you provided taken from the same computer, running the same copy of OS X? Or did you move a removable disk to another computer, or boot to a different copy of OS X, between the before and after? I ask because the table of user and group names is stored in the OS, while the disk only stores the user and group ids. So if you have one computer with group "staff" with group id 502 and create a file or directory with that ownership, then move it to a different computer or OS X installation where group id 502 is "postgres", then that would account for the difference you see. You didn't mention that, so that seems unlikely. However I am not sure what other explanation to offer; what you describe should not be possible.