Subject Re: [firebird-support] permissions nbackup
Author Tomasz Tyrakowski
On 14.08.2017 at 17:21, Nick Upson nu@... [firebird-support] wrote:
> if I do nbackup ..... it fails, telling me I cannot access the
> security2.fdb (as a normal user)

According to nbackup manual

https://www.firebirdsql.org/manual/nbackup-functions-params.html

for backing up (-B) you need both FB access and file system access to
the database being backed up and its directory (potentially a delta file
may be created), not to the security db.
Try a quick experiment (suppose your user name is user1). Create a
directory with owner user1 and group owner firebird (someplace both
user1 and firebird can access), set its permissions to 770. Put a
database (e.g. db.fdb) inside it, set its owner to user1 and group owner
to firebird. Set the file permissions of db.fdb to 660.
Now try a full backup:
/path_to/nbackup -U sysdba -P sysdba_password -B 0
localhost:/path_to/db.fdb /path_to/db.nbk
It's gonna work (just tried it on Debian + FB 2.5 and it does),
providing you have proper owners / group owners and permissions to the
database being backed up, the directory it is located in, and the
directory you want to put the backup file in (it's in the reference
mentioned above: you need to have access to _both_ the firebird server
and the database file you want to process, hence the -U + -P and
dir/file permissions) .

regards
Tomasz