Bug 443223
Summary: | Tablespace creation failure: could not set permissions on directory | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Graham Leggett <minfrin> |
Component: | postgresql | Assignee: | Tom Lane <tgl> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 5.3 | CC: | hhorak |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-04-19 16:30:04 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Graham Leggett
2008-04-19 12:54:40 UTC
As the comment says, the chmod should succeed if the directory is both accessible to and owned by the postgres user; and if either of those conditions doesn't hold, we can't use the directory anyway. (I suspect the failure in this case was because some upper-level directory in the path had the wrong permissions.) So I see no bug here. If you can point out a real-world case where the chmod wouldn't work and yet it'd be all right to use the directory, I might reconsider. As it turned out, the postgresql server had cached permission credentials, so while the postgres user could see the directory without a problem, this was not possible by postgresql until the server could be restarted from scratch. Going off to Google found a number of hits about it not being possible to chmod a directory if you are not the superuser under certain, and with the addition of SELinux the wild goose chase was assured. Ideally the error message should suggest that the server might need to be restarted before the permissions take effect. Per the concurrent discussion in pgsql-admin, there is no obvious reason why a restart would help. I think you might possibly have a reason to file a kernel bug here, but it's not a postgres bug. |