Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow working directory to be configurable via globals (instead of always using /tmp) #786

Merged
merged 2 commits into from
Sep 2, 2016

Conversation

hdeadman
Copy link
Contributor

When running on a server with /tmp mounted with "noexec" option in fstab (to satisfy security) I was getting an error like:

Error: Error executing SQL; psql returned 256: 'could not change directory to "/root"

which was resolved for most people back in version 2.2.1 by setting /tmp as the working directory for psql. I need to set the folder to something else now that /tmp is secure so this pull request makes /tmp configurable.

This pull also has a commit from another pull request I have open that is waiting for 4.6.1 to come out so the tests will pass.

note selector doesn't include inline equals expression due to puppet 3
@hdeadman
Copy link
Contributor Author

Opened ticket MODULES-3759

@eputnam
Copy link
Contributor

eputnam commented Sep 1, 2016

thanks for the PR! please add the new param to the readme and add some tests.

@hdeadman
Copy link
Contributor Author

hdeadman commented Sep 2, 2016

I updated the documentation and added a couple tests. Let me know if you want tests that cover every class or define where the the attribute is used.

@eputnam
Copy link
Contributor

eputnam commented Sep 2, 2016

merging. out of curiosity, is there a reason psql needs to be run in a particular dir? does the dir need to be writable?

@eputnam eputnam merged commit 3f7058e into puppetlabs:master Sep 2, 2016
@hdeadman
Copy link
Contributor Author

hdeadman commented Sep 2, 2016

@eputnam - I was having problems on a server with /tmp mounted in /etc/fstab with noexec option. There is a security check in the scap security guide that calls for that. I don't recall exactly which part of module was breaking but when I google'd error message it brought me to the release notes for the change that made psql use /tmp to begin with.

cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Oct 23, 2017
Allow working directory to be configurable via globals (instead of always using /tmp)
@Ramesh7 Ramesh7 requested review from Charmainepr1 and removed request for Charmainepr1 June 12, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants