Skip to content

Error when building to a folder not owned by the Hugo process #7302

@klakegg

Description

@klakegg

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.71.0-06150C87/extended linux/amd64 BuildDate: 2020-05-18T16:15:29Z

Does this issue reproduce with the latest release?

Yes it does.

The error occures when the Hugo process have write access to the destination folder but does not own it.

To reproduce, create a public folder owned by root in your Hugo site project (requires sudo access):

sudo sh -c "mkdir public && chmod a+w public"

Run Hugo:

hugo

Log:

Building sites … WARN 2020/05/21 14:09:25 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Total in 111 ms
Error: Error copying static files: chtimes [..]/public/: operation not permitted

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions