Find the Current Permanent Directory
Last modified by Eleni Cojocariu on 2026/09/11 18:08
Steps
An instance does not always use the permanent directory you configured: an unset or unwritable value falls back to the temporary directory. This reads the one actually in use. You need programming rights on the wiki.
- Create a page with the Wiki editor and insert this script:
{{velocity}} $services.component.getInstance('org.xwiki.environment.Environment').getPermanentDirectory().getCanonicalPath() {{/velocity}} - Click "Save". The page renders the absolute path of the directory in use:
/var/lib/xwiki/data
FAQ
Why do I get an error when I save the page?
The script needs programming rights, which it only has when the page was last saved by a user who holds them.
Is there a way that does not need a script?
Yes. The startup log carries the line Using permanent directory [...], which reports the configured value rather than the resolved absolute path.