transloadit/uppy · critical · Error
No access to "${filePath}". Please ensure the directory exis
Error message
No access to "${filePath}". Please ensure the directory exists and with read/write permissions. What it means
Companion validates at startup that its filePath (the directory used for temporary downloads/uploads) exists and is readable and writable via fs.accessSync. If the OS denies access or the directory doesn't exist, validateConfig throws this error.
Source
Thrown at packages/@uppy/companion/src/config/companion.ts:100
.array()
.optional(),
maxFilenameLength: z.number().positive().optional(),
})
/**
* Validates that the mandatory Companion options are set.
*
* If invalid, throws with an error explaining what needs to be fixed.
*/
export function validateConfig(companionOptions: CompanionInitOptions): void {
const parsedConfig = validateConfigSchema.parse(companionOptions)
const { filePath } = parsedConfig
// validate that specified filePath is writeable/readable.
try {
fs.accessSync(filePath, fs.constants.R_OK | fs.constants.W_OK)
} catch {
throw new Error(
`No access to "${filePath}". Please ensure the directory exists and with read/write permissions.`,
)
}
const { providerOptions, server, uploadUrls } = companionOptions
// see https://github.com/transloadit/uppy/issues/4271
// todo fix the code so we can allow `/`
if (server.path === '/') {
throw new Error(
"If you want to use '/' as server.path, leave the 'path' variable unset",
)
}
if (providerOptions) {
const deprecatedOptions: Record<string, string> = {
microsoft: 'providerOptions.onedrive',
google: 'providerOptions.drive',View on GitHub (pinned to 5d4dedd02a)
Solutions
- mkdir -p the directory and chown it to the user running Companion
- Set filePath in companion config to an existing writable path
- In Docker, ensure the mounted volume's ownership matches the container user (or use the proper USER directive)
Example fix
// before companionOptions.filePath = '/data/companion' // after (Dockerfile) RUN mkdir -p /data/companion && chown -R node:node /data/companion USER node
Defensive patterns
Strategy: validation
Validate before calling
import fs from 'node:fs' fs.accessSync(filePath, fs.constants.R_OK | fs.constants.W_OK)
Type guard
null
Try / catch
try { companion.app(options) } catch (e) { if (String(e?.message).includes('No access to')) { fixPermissions(); } throw e } Prevention
- Pre-create and chown the data directory in Dockerfiles
- Health-check volume permissions in deployment scripts
- Run Companion under a dedicated user that owns filePath
When it happens
Trigger: Starting Companion with filePath pointing to a missing directory, a read-only volume, or a directory owned by another user (common in Docker where the container user differs from the volume owner).
Common situations: Docker/Kubernetes deployments with improperly permissioned volumes; filePath defaulting to /tmp on locked-down systems; running under a non-root service user.
Related errors
- If you want to use '/' as server.path, leave the 'path' vari
- uploadUrls is required
- Option corsOrigins is required. To disable security, pass tr
- File data is missing for file ${options.file.id}
- Missing S3 object key for aborting upload
AI-assisted analysis of transloadit/uppy@5d4dedd02a (2026-08-28).
Data as JSON: /api/errors/4b7e3ebba9572b61.
Report an issue: GitHub.