時間:2024-02-13 10:22作者:下載吧人氣:34
用戶默認(rèn)情況下具有public權(quán)限,public默認(rèn)具有創(chuàng)建和使用schema的權(quán)限,因此意味著可以在schema中創(chuàng)建對象(包括表)、列出schema中的對象,并在其權(quán)限允許時訪問它們。
所以創(chuàng)建數(shù)據(jù)庫或schema完成后做的第一件事是
1.1 創(chuàng)建數(shù)據(jù)庫完成后
–回收schema的public權(quán)限
–revoke all on schema public from public; –正常情況使用這個
revoke all on schema public,tiger,tiger_data,topology from public; –使用postgis擴(kuò)展使用這個
–從core數(shù)據(jù)庫收回public的所有權(quán)限
revoke all on database core from public;
revoke all on database postgres from public;
–重新將schema授予數(shù)據(jù)庫所有者
grant all on schema public,tiger,tiger_data,topology to 數(shù)據(jù)庫所有者;
網(wǎng)友評論