---
name: "CGI::Session::Driver::db_file"
section: "3pm"
platform: "linux"
package: "perl-cgi-session"
version: "4.49-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/CGI::Session::Driver::db_file"
---

# CGI::Session::Driver::db\_file(3pm)

CGI::Session driver for BerkeleyDB using DB\_File

## NAME

CGI::Session::Driver::db\_file - CGI::Session driver for BerkeleyDB using DB\_File

## SYNOPSIS

```
    $s = CGI::Session->new("driver:db_file", $sid);
    $s = CGI::Session->new("driver:db_file", $sid, {FileName=>'/tmp/cgisessions.db'});
```

## DESCRIPTION

**db\_file** stores session data in BerkelyDB file using DB\_File - Perl module. All sessions will be stored  in a single file, specified in *FileName* driver argument as in the above example. If *FileName* isn't given,  defaults to */tmp/cgisess.db*, or its equivalent on a non-UNIX system.

If the directory hierarchy leading to the file does not exist, will be created for you.

This module takes a **UMask** option which will be used if DB\_File has to create the database file for you. By default the umask is 0660.

## LICENSING

For support and licensing information see CGI::Session
