Building site fails with group-only permissions

Heyho,

I’m using hugo 0.16-2 from the debian jessie repositories on a Debian jessie installation. For our website destination directory (the one passed with -d) we have owner wwwowner and group wwwgroup. Since this directory is NFS mounted on another multiuser-host, the permissions on this directory should be 0770 with the sgid-bit set. Now when running hugo it tries to chmod that directory to 0755 every time and fails since the wwwowner is a system-user not used by the people building the site. Those peoples useraccounts are all part of the wwwgroup group and therefore can do anything inside the destination directory. However they cannot change the destination directory itself so hugo fails, aborts and does not create the site. Is there any reasoning within this behaviour? Could it be changed to just print a warning if hugo fails to chmod and utimensat(2) the destination directory? Is this a valid bug to open an issue on github?

The setup I described worked with 0.12, so this is at least a regression.

Let me know if you need more information.

It would be good if you could paste that info into an issue here, so we can track it:

Not sure if it changes anything for you, but Hugo 0.17 has been released for a while now and I’m pretty sure it is available in Debian.

/cc @anthonyfok

I was absent for an extended period of time, and did not package Hugo 0.17 for Debian (sorry!)

Thankfully, another Debian developer, Dr. Tobias (@toddy15) did all the work getting Hugo 0.18 (as of Dec 22) and now 0.18.1 (Dec 30) into Debian, just in time for the Debian 9 “stretch” soft freeze too!