Group permissions for content folders generated in publish dir different between 0.46 and 0.47

I’m having problems with group permissions of the folders in the publish directory after upgrading to 0.47. Everything works the way I want in 0.46 but not in 0.47 (or 0.47.1).

Our domain users can push changes to the web server and Mercurial hook will automatically start the build process. After upgrading to 0.47 the build process fails because the generated content folders are getting drwxr-sr-x permissions instead of drwxrwsr-x like in 0.46.

Here’s what it looks like when running the build process:

Owner on 0.46:

Owner on 0.47:

Domain user (group) on 0.46:

Domain user (group) on 0.47:

Here’s what I ran when setting up the environment to make sure the group and permissions would stay correct but they don’t after 0.47:
sudo chown optech:“domain users” /home/optech/www-r5
chmod g+s /home/optech/www-r5
cd /home/optech/www-r5
sudo rm -rf public
sudo rm -rf public_temp
mkdir public
mkdir public_temp
sudo find . -type d -exec chgrp “domain users” {} +
sudo find . -type d -exec chmod 775 {} ;
sudo find . -type f -exec chmod 664 {} ;
sudo setfacl -R -d -m u::rwX,g:domain^users:rwX,o::rX /home/optech/www-r5
sudo find . -type d -exec chmod g+s {} +

All domain users and optech also have their umask set to 002 in ~/.profile:
umask

hugo env with 0.46:
GOOS=“linux”
GOARCH=“amd64”
GOVERSION=“go1.10.1”

hugo env with 0.47:
GOOS=“linux”
GOARCH=“amd64”
GOVERSION=“go1.10.3”

I’m not sure if this was some planned change or a bug or what but I would like to be able to upgrade to 0.47.1 and still keep the permissions working like they did before. Thanks in advance for any explanations and/or solutions.

I will check this for the soon-to-come Hugo 0.38 (Go 1.11, possibly today):

This was not intented – I reimplemented the “publishing part” to get minification support, and I may have accidently slipped here.

Thank you for the quick reply and also thanks for all the hard work you’re doing for Hugo, it really is an awesome static site generator. I’ll patiently wait for the next version before upgrading then.

1 Like