You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
We're mounting several folders to the vagrant VM via NFS. One of these is mounted on /var/www. When the Apache puphpet::apache::install executes the command to create vhosts, it has a dependency on a command to create & set permissions of the /var/www directory. Which results in the following error:
==> local.dev: Notice: /Stage[main]/Puphpet::Apache::Install/Exec[Create apache webroot]/returns: chown: changing ownership of ‘/var/www’: Operation not permitted
==> local.dev: Error: mkdir -p /var/www && chown root:www-data /var/www && chmod 775 /var/www && touch /.puphpet-stuff/apache-webroot-created returned 1 instead of one of [0]
==> local.dev:
==> local.dev: Error: /Stage[main]/Puphpet::Apache::Install/Exec[Create apache webroot]/returns: change from notrun to 0 failed: mkdir -p /var/www && chown root:www-data /var/www && chmod 775 /var/www && touch /.puphpet-stuff/apache-webroot-created returned 1 instead of one of [0]
Looking at the comment from that command, this seems to a fix for when the guest OS is CentOS 2.4. We're using Ubuntu 14.04 as a guest OS & on top of that the whole mounting of the folder. Also, the error only happens on Linux, specifically Ubuntu 16.10. A colleague tried it on his Mac & had no issues.
The error seems to be specific to NFS on Linux, but since the command is very specific about what it does, taking little from configuration, there is no way to disable it. Adding a flag for which OS to run on might not be enough and it might cause issues with other OS that were also relying on this fix.
What do you think of adding unless => "mountpoint -q ${www_root}", to the command options?
The command should be available & it returns 0 if the directory is a mount point.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So this is a bit of a weird one.
Scenario:
We're mounting several folders to the vagrant VM via NFS. One of these is mounted on
/var/www
. When the Apachepuphpet::apache::install
executes the command to create vhosts, it has a dependency on a command to create & set permissions of the/var/www
directory. Which results in the following error:Looking at the comment from that command, this seems to a fix for when the guest OS is CentOS 2.4. We're using Ubuntu 14.04 as a guest OS & on top of that the whole mounting of the folder. Also, the error only happens on Linux, specifically Ubuntu 16.10. A colleague tried it on his Mac & had no issues.
The error seems to be specific to NFS on Linux, but since the command is very specific about what it does, taking little from configuration, there is no way to disable it. Adding a flag for which OS to run on might not be enough and it might cause issues with other OS that were also relying on this fix.
What do you think of adding
unless => "mountpoint -q ${www_root}",
to the command options?The command should be available & it returns
0
if the directory is a mount point.The text was updated successfully, but these errors were encountered: