>> LOG: Could not set group of /tmp/.s.PGSQL.5432: Operation not
    >> permitted postmaster: cannot create UNIX stream port

    Benjamin> Does that file exist?  The latest postgresql upgrade changes
    Benjamin> the postgresql user to 'postgres' instead of 'pgsql' to match
    Benjamin> other installations, perhaps there's an old file sitting
    Benjamin> around with bad ownership.

The file doesn't exist.  postgres and pgsql users and groups (all with id ==
252) are defined in NetInfo.  /sw/bin/postgres doesn't have any unusual
permissions (755).

    Benjamin> Try 'sudo rm -rf /tmp/.s.PGSQL.5432' and start again.  You
    Benjamin> probably shouldn't be messing with /tmp's permissions.  (If
    Benjamin> they're off, you can put them back to what they should be by
    Benjamin> doing 'sudo chmod 1777 /tmp/'.)

I agree I shouldn't fiddle with /tmp's permissions.  I was just trying to
worm around the problem.  Once I fiddled and failed, I reset the
permissions.

I just tried running postmaster under ktrace.  It can create the socket (the
bind() call), but the ensuing chown(2) call fails:

     22603 postgres CALL  open(0xbfffefe0,0xa02,0x180)
     22603 postgres NAMI  "/tmp/.s.PGSQL.5432.lock"
     22603 postgres RET   open 5
     22603 postgres CALL  write(0x5,0xbfffeaf0,0x23)
     22603 postgres GIO   fd 5 wrote 35 bytes
           "22603
            /Users/skip/var/pg/databases
           "
     22603 postgres RET   write 35/0x23
     22603 postgres CALL  close(0x5)
     22603 postgres RET   close 0
     22603 postgres CALL  unlink(0x1bd024)
     22603 postgres NAMI  "/tmp/.s.PGSQL.5432"
     22603 postgres RET   unlink -1 errno 2 No such file or directory
     22603 postgres CALL  bind(0x4,0xbffff430,0x14)
     22603 postgres NAMI  "/tmp/.s.PGSQL.5432"
     22603 postgres RET   bind 0
     22603 postgres CALL  chown(0x1bd024,0xffffffff,0xfc)
     22603 postgres NAMI  "/tmp/.s.PGSQL.5432"
     22603 postgres RET   chown -1 errno 1 Operation not permitted
     22603 postgres CALL  write(0x2,0xbffff280,0x49)
     22603 postgres GIO   fd 2 wrote 73 bytes
           "LOG:  Could not set group of /tmp/.s.PGSQL.5432: Operation not permitted
           "
     22603 postgres RET   write 73/0x49
     22603 postgres CALL  write(0x2,0xbfffeca0,0xc)
     22603 postgres GIO   fd 2 wrote 12 bytes
           "postmaster: "
     22603 postgres RET   write 12/0xc
     22603 postgres CALL  write(0x2,0xbfffecf0,0x1e)
     22603 postgres GIO   fd 2 wrote 30 bytes
           "cannot create UNIX stream port"
     22603 postgres RET   write 30/0x1e
     22603 postgres CALL  write(0x2,0xa0000dc7,0x1)
     22603 postgres GIO   fd 2 wrote 1 byte
           "
           "
     22603 postgres RET   write 1
     22603 postgres CALL  close(0x3)
     22603 postgres RET   close 0
     22603 postgres CALL  unlink(0x1bd024)
     22603 postgres NAMI  "/tmp/.s.PGSQL.5432"
     22603 postgres RET   unlink 0
     22603 postgres CALL  unlink(0xa8adb0)
     22603 postgres NAMI  "/tmp/.s.PGSQL.5432.lock"
     22603 postgres RET   unlink 0
     22603 postgres CALL  unlink(0xa8ad80)
     22603 postgres NAMI  "/Users/skip/var/pg/databases/postmaster.pid"
     22603 postgres RET   unlink 0
     22603 postgres CALL  exit(0x1)

It's trying to change the group to 252, the postgres group.  Since the
postgres executable isn't suid or sgid, I took that to mean any user running
the postmaster command must be in the postrgres group.  After adding my
login to the postgres group I was able to run postmaster successfully.  The
group membership requirement must be another change between 7.2 and 7.3.2.

Thanks for the help,

Skip


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to