diff --git a/modules/ROOT/pages/configuration/file-locations.adoc b/modules/ROOT/pages/configuration/file-locations.adoc index 6d8b38676..96e00ff64 100644 --- a/modules/ROOT/pages/configuration/file-locations.adoc +++ b/modules/ROOT/pages/configuration/file-locations.adoc @@ -1,118 +1,267 @@ :description: An overview of where files are stored in the different Neo4j distributions, and the necessary file permissions for running Neo4j. + [[file-locations]] = Default file locations -The following table lists the default location of the Neo4j files, per type, and distribution. - -[[table-file-locations]] -.Default file locations -[cols="6", options="header"] -|=== -| File type -| Description -| Linux / macOS / Docker -| Windows -| Debian / RPM -| Neo4j Desktop footnote:[Applicable to all operating systems where Neo4j Desktop is supported.] - -| Bin -| The Neo4j running script and built-in tools, such as Cypher Shell and Neo4j Admin. -| _/bin_ -| _\bin_ -| _/usr/bin_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd bin`. - -| Certificates -| The Neo4j TLS certificates. -| _/certificates_ -| _\certificates_ -| _/var/lib/neo4j/certificates_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd certificates`. - - -| Configuration footnote:[For details about _neo4j.conf_, see xref:configuration/neo4j-conf.adoc[The neo4j.conf file].] -| The Neo4j configuration settings, Log4j configuration settings, and the JMX access credentials. -| _/conf/neo4j.conf_ + +[[neo4j-directories]] +== Neo4j directories + +The page describes the Neo4j directories, specifying their default locations per distribution and minimal file permissions. + +Instructions provided for Neo4j Desktop are applicable across all operating systems where Neo4j Desktop is supported. + +[NOTE] +==== +If _tmp_ is set to `noexec`, it is recommended to set `dbms.jvm.additional=-Djava.io.tmpdir=/home/neo4j` in _conf/neo4j.conf_. +Additionally, replace _/home/neo4j_ with a path that has `exec` permissions. + +For _/bin/cypher-shell_, set this via an environment variable: `export JAVA_OPTS=-Djava.io.tmpdir=/home/neo4j` and replace `/home/neo4j` with a path that has `exec` permissions. +==== + +[[neo4j-bin]] +=== Bin + +Description:: The Neo4j running script and built-in tools, such as xref:tools/cypher-shell.adoc[Cypher Shell] and xref:tools/neo4j-admin/index.adoc[Neo4j Admin]. + +File permissions:: Read only and execute. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/bin_ +| Windows | _\bin_ +| Debian / RPM | _/usr/bin_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_ and run `cd bin`. +|=== + +[[neo4j-certificates]] +=== Certificates + +Description:: The Neo4j TLS certificates. + +File permissions:: Read only. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/certificates_ +| Windows | _\certificates_ +| Debian / RPM | _/var/lib/neo4j/certificates_ +| Neo4j Desktop| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_ and run `cd certificates`. +|=== + +[[neo4j-config]] +=== Configuration + +Description:: The Neo4j configuration settings, Log4j configuration settings, and the JMX access credentials. +For details about _neo4j.conf_, see xref:configuration/neo4j-conf.adoc[The neo4j.conf file]. + +File permissions:: Read only + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/conf/neo4j.conf_ + _/conf/server-logs.xml_ + _/conf/user-log.xml_ -| _\conf\neo4j.conf_ +| Windows | _\conf\neo4j.conf_ + _\conf\server-logs.xml_ + _\conf\user-log.xml_ -| _/etc/neo4j/neo4j.conf_ +| Debian / RPM | _/etc/neo4j/neo4j.conf_ + _/etc/neo4j/server-logs.xml_ + _/etc/neo4j/user-log.xml_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd conf`. - -| Data footnote:[The data directory is internal to Neo4j and its structure is subject to change between versions without notice.] -| All data-related content, such as databases, transactions, cluster-state (if applicable), dumps, and the _cypher.script_ files (from the `neo4j-admin database restore` command). -| _/data_ -| _\data_ -| _/var/lib/neo4j/data_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd data`. - -| Import -| All CSV files that the command `LOAD CSV` uses as sources to import data in Neo4j. -| _/import_ -| _\import_ -| _/var/lib/neo4j/import_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd import`. - -| Labs footnote:[For more information, see https://neo4j.com/labs/apoc/{neo4j-version}/installation/[APOC User Guide -> Installation].] -| Contains APOC Core. -| _/labs_ -| _\labs_ -| _/var/lib/neo4j/labs_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd labs`. - -| Lib -| All Neo4j dependencies. -| _/lib_ -| _\lib_ -| _/usr/share/neo4j/lib_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd lib`. - -| Licenses -| For storing license files from Neo4j. -| _/licenses_ -| _\licenses_ -| _/var/lib/neo4j/licenses_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd licences`. - -| Logs -| The Neo4j log files. -| _/logs_ footnote:[To view _neo4j.log_ in Docker, use xref:docker/mounting-volumes.adoc#docker-volumes-logs[`docker logs `].] -| _\logs_ -| _/var/log/neo4j/_ footnote:[To view the neo4j.log for Debian and RPM, use `journalctl --unit=neo4j`.] -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd logs`. - -| Metrics -| The Neo4j built-in metrics for monitoring the Neo4j DBMS and each individual database. -| _/metrics_ -| _\metrics_ -| _/var/lib/neo4j/metrics_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd metrics`. - -| Plugins -| Custom code that extends Neo4j, for example, user-defined procedures, functions, and security plugins. -| _/plugins_ -| _\plugins_ -| _/var/lib/neo4j/plugins_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd plugins`. - -| Products -| The jar files of the Neo4j products: Graph Data Science Library and Bloom. The folder also contains a _README.txt_ file with information on enabling them. -| _/products_ -| _\products_ -| _/var/lib/neo4j/products_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd products`. - -| Run -| The processes IDs. -| _/run_ -| _\run_ -| _/var/lib/neo4j/run_ -| From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd run`. +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_ and run `cd conf`. +|=== + +[[data]] +=== Data + +Description:: All data-related content, such as databases, transactions, cluster-state (if applicable), dumps, and the _cypher.script_ files (from the `neo4j-admin database restore` command). +The data directory is internal to Neo4j and its structure is subject to change between versions without notice. + +File permissions:: Read and write. + +[cols="1,4", options="header"] |=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/data_ +| Windows | _\data_ +| Debian / RPM | _/var/lib/neo4j/data_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd data`. +|=== + +[[neo4j-import]] +=== Import + +Description:: All CSV files that the command `LOAD CSV` uses as sources to import data in Neo4j. + +File permissions:: Read only + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/import_ +| Windows | _\import_ +| Debian / RPM | _/var/lib/neo4j/import_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd import`. +|=== + +[[neo4j-labs]] +=== Labs + +Description:: Contains APOC Core. +For more information, see https://neo4j.com/docs/apoc/current/installation/[APOC User Guide -> Installation]. + +File permissions:: Read only. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/labs_ +| Windows | _\labs_ +| Debian / RPM | _/var/lib/neo4j/labs_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd labs`. +|=== + +[[neo4j-lib]] +=== Lib + +Description:: All Neo4j dependencies. + +File permissions:: Read only. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/lib_ +| Windows | _\lib_ +| Debian / RPM | _/usr/share/neo4j/lib_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd lib`. +|=== + +[[neo4j-licenses]] +=== Licenses + +Description:: For storing license files from Neo4j. + +File permissions:: Read only. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/licenses_ +| Windows | _\licenses_ +| Debian / RPM | _/var/lib/neo4j/licenses_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd licences`. +|=== + +[[neo4j-logs]] +=== Logs + +Description:: The Neo4j log files. + +File permissions:: Read and write. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/logs_ footnote:[To view _neo4j.log_ in Docker, use xref:docker/mounting-volumes.adoc#docker-volumes-logs[`docker logs `].] +| Windows | _\logs_ +| Debian / RPM | _/var/log/neo4j/_ footnote:[To view the neo4j.log for Debian and RPM, use `journalctl --unit=neo4j`.] +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd logs`. +|=== + +[[neo4j-metrics]] +=== Metrics + +Description:: The Neo4j built-in metrics for monitoring the Neo4j DBMS and each individual database. + +File permissions:: Read and write. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/metrics_ +| Windows | _\metrics_ +| Debian / RPM | _/var/lib/neo4j/metrics_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd metrics`. +|=== + +[[neo4j-plugins]] +=== Plugins + +Description:: Custom code that extends Neo4j, for example, user-defined procedures, functions, and security plugins. + +File permissions:: Read only. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/plugins_ +| Windows | _\plugins_ +| Debian / RPM | _/var/lib/neo4j/plugins_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd plugins`. +|=== + +[[neo4j-products]] +=== Products + +Description:: The JAR files of the Neo4j products: link:https://neo4j.com/docs/graph-data-science/current/[Graph Data Science Library] and link:https://neo4j.com/docs/bloom-user-guide/current/[Neo4j Bloom]. +The folder also contains a _README.txt_ file with information on enabling them. + +File permissions:: Read only. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/products_ +| Windows | _\products_ +| Debian / RPM | _/var/lib/neo4j/products_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd products`. +|=== + +[[neo4j-run]] +=== Run + +Description:: The processes IDs. + +File permissions:: Read and write. + +[cols="1,4", options="header"] +|=== +| Neo4j distribution +| Default file location + +| Linux / macOS / Docker | _/run_ +| Windows | _\run_ +| Debian / RPM | _/var/lib/neo4j/run_ +| Neo4j Desktop | From the _Open_ dropdown menu of your active Neo4j DBMS, select _Terminal_, and run `cd run`. +|=== + [[file-locations-file-locations]] == Customize your file locations @@ -140,6 +289,7 @@ The locations of __ and _conf_ can be configured using environment v | Must be set explicitly if it is not a subdirectory of __. |=== + The rest of the locations can be configured by uncommenting the respective setting in the _conf/neo4j.conf_ file and changing the default value. [source, shell] @@ -156,36 +306,3 @@ The rest of the locations can be configured by uncommenting the respective setti #server.directories.import=import ---- - -[[file-locations-permissions]] -== File permissions - -The operating system user that Neo4j server runs as must have the following minimal permissions: - -Read only:: - * _bin_ - * _certificates_ - * _conf_ - * _import_ - * _labs_ - * _lib_ - * _licenses_ - * _plugins_ - * _products_ - -Read and write:: - * _data_ - * _logs_ - * _metrics_ - * _run_ - -Execute:: - * all files in _bin_ and _tmp_ - -[NOTE] -==== -If _tmp_ is set to `noexec`, it is recommended to set `dbms.jvm.additional=-Djava.io.tmpdir=/home/neo4j` in _conf/neo4j.conf_. -Additionally, replace _/home/neo4j_ with a path that has `exec` permissions. - -For _/bin/cypher-shell_, set this via an environment variable: `export JAVA_OPTS=-Djava.io.tmpdir=/home/neo4j` and replace `/home/neo4j` with a path that has `exec` permissions. -==== \ No newline at end of file