Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #708
| Path | csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Robert Klemme <shortcutter@googlemail.com> |
| Newsgroups | comp.databases.postgresql |
| Subject | Re: problem with pg_dumpall |
| Date | Thu, 31 Mar 2016 11:15:49 +0200 |
| Lines | 39 |
| Message-ID | <dm4866FtegbU1@mid.individual.net> (permalink) |
| References | <ndhvbu$h3e$1@news.m-online.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net 1eqwY0AF5adx6eKArjOHWQfdRdMCg150RHIc3/CZ/i/Y/aK3E= |
| Cancel-Lock | sha1:tJtJDCwAwODbaCRU9DmfSpneVx8= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
| In-Reply-To | <ndhvbu$h3e$1@news.m-online.net> |
| Xref | csiph.com comp.databases.postgresql:708 |
Show key headers only | View raw
On 31.03.2016 03:43, Magnus Warker wrote: > Hi, > > my user "warker" has a script in /home/warker/scr/bak with the following > content: > > #!/bin/sh > echo Database Backup > pg_dumpall -Uwww > /home/wagner/bak/dbs.sql > > When I call this script as user warker, it works fine. > > However, there is a system-wide backup script /root/scr/bak with the > following contents: > > #!/bin/sh > echo "User Backup" > ... > su -c /home/warker/scr/bak warker > ... > > When I call this script as root, I get the following error: > > could not change directory to "/root": Permission denied > > I found that this error is caused by pg_dumpall, which is a script. > > What's the problem here? Your environment most likely carries around the original value of HOME. I'd try sudo for a change. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar
problem with pg_dumpall Magnus Warker <warker@mailinator.com> - 2016-03-31 03:43 +0200
Re: problem with pg_dumpall Robert Klemme <shortcutter@googlemail.com> - 2016-03-31 11:15 +0200
Re: problem with pg_dumpall Magnus Warker <warker@mailinator.com> - 2016-04-01 18:53 +0200
csiph-web