这是indexloc提供的服务,不要输入任何密码
Skip to content

Create storage:ensure-directory command #4805

@nileio

Description

@nileio

High Level Plan

  • Create a storage:ensure-directory command that creates subdirectories in /var/lib/dokku/data/storage/ and chowns them to the herokuish user
  • The chown can be disabled via the --skip-chown
  • Running the command when a directory already exists does nothing, but it may re-chown the directory if the --skip-chown flag is not set.

Original Post

refering to
dokku Persistent Storage

The example refers to the Recommended Location for storage being /var/lib/dokku/data/storage/ however this location is owned by dokku user and so it is not possible to use it without sudo
So the example below return Permission denied if not using sudo

# creating storage for the app 'node-js-app'
mkdir -p  /var/lib/dokku/data/storage/node-js-app
mkdir: cannot create directory ‘/var/lib/dokku/data/storage/node-js-app’: Permission denied

Not sure why this is the recommended location for storage though, but also want to raise to either correct the documentation and add sudo or so clarify if possible this point. Also just wanted to confirm that my setup doesn't have missed up permissions!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions