I am using Ubuntu 18.04.4 LTS and I've recently upgraded from Firebird 2.5 to Firebird 3.0.
Prior to upgrading, I was restoring my local database with the following unzip&replace command:
zcat /var/www/temp/<database name><backup timestamp>.gbak.gz | gbak -rep -v stdin /database/<database name>.fdb -user <username> -pass <password>
This did the whole job in one step and I dig that sort of thing. However, after upgrading Firebird I have discovered that FlameRobin (version 0.9.2.1850) will not connect to the updated database. The error message (to help others who may be Googling) is:
Engine Code: 335544344
Engine Message: I/O error during "open" operation for file "/database/.fdb"
Error while trying to open file
And my CodeIgniter project complains:
Unable to connect to your database server using the provided settings.
To solve this, I change the
<database name>.fdb file's owner and group to
firebird then everything is sweet. However I am doing this in two steps ...ugh, lame right? ...I know.
So I am wondering if I can execute something like Change folder permissions and ownership in the same line as my above unzip&replace command?
My system admin fu is not terribly impressive, so I haven't dared to get too crazy with my attempts, but I figure this should be a relatively basic task for those with experience in such things.
p.s. Ideally, I'd like it if I never had to change the owner settings on every restore, so if there is a way to do that -- that would be even better.