Thread: /usr/local/pgsql/data permissions
My server just crashed because a CPU-intensive build threatened to overheat the processor so the system shut down. When I rebooted and tried to start postgres the attempt failed because `data directory "/usr/local/pgsql/data" has group or world access'. As far as I can recall, it's always been 755 like the other directories in /usr/local/pgsql. When I changed the perms to 700 I was able to start postgres. I want to check that these are the proper permissions (I can run psql from the command line and access Ledger-123 so I assume they're OK.) How the permissions on the directory changed when the system shut down will probably always remain a mystery. Rich
On 09/23/11 1:48 PM, Rich Shepard wrote: > My server just crashed because a CPU-intensive build threatened to > overheat the processor so the system shut down. When I rebooted and > tried to > start postgres the attempt failed because `data directory > "/usr/local/pgsql/data" has group or world access'. As far as I can > recall, > it's always been 755 like the other directories in /usr/local/pgsql. > > When I changed the perms to 700 I was able to start postgres. I want to > check that these are the proper permissions (I can run psql from the > command > line and access Ledger-123 so I assume they're OK.) > > How the permissions on the directory changed when the system shut down > will probably always remain a mystery. > Indeed, 700 are the correct privs. # ls -ld /var/lib/pgsql/9.0/data drwx------. 13 postgres postgres 4096 Sep 12 20:07 /var/lib/pgsql/9.0/data # ls -ld /var/lib/pgsql/data drwx------ 11 postgres postgres 4096 Sep 9 12:08 /var/lib/pgsql/data # ls -ld /var/postgres/8.4-community/data_64 drwx------ 11 postgres dba 18 May 14 08:37 /var/postgres/8.4-community/data_64 $ ls -ld $PGDATA drwx------ 11 postgres staff 4096 Jun 07 12:29 /u01/pgsql/data (different machines, different operating systems even...) -- john r pierce N 37, W 122 santa cruz ca mid-left coast
On Fri, 23 Sep 2011, John R Pierce wrote: > Indeed, 700 are the correct privs. John, When it started and worked I assumed that was the case. But, I've not before had directory permissions change when a system crashed. Cue the "Twilight Zone" theme. Thanks, Rich
On 09/23/11 2:14 PM, Rich Shepard wrote: > When it started and worked I assumed that was the case. But, I've not > before had directory permissions change when a system crashed. > > Cue the "Twilight Zone" theme. did the system run some sort of fsck autorepair when it restarted? thats about the only thing I could think of that might have messed with the permissions. -- john r pierce N 37, W 122 santa cruz ca mid-left coast
On Fri, 23 Sep 2011, John R Pierce wrote: > did the system run some sort of fsck autorepair when it restarted? thats > about the only thing I could think of that might have messed with the > permissions. The file system is ext3 so it did restore from the journals. Anyway, now I know if I should ever again be unable to start postgres, check the permissions per the error message. Thanks again, Rich