Closed tgodfrey closed 7 years ago
I used sudo
and it went through
Why would it need sudo just to build a release package?
I feel so confused by the same result ,and @freemanon 's way is right, thank you !But still don't understand why need 'sudo'!...
Phoenix is switching to distillery, which is kind of a drop-in replacement. I switched to it without issues.
I'm going to close this issue, because it has become moot in my workflow. I'm deploying to Ubuntu, and so I'm developing on MacOS, building on an Ubuntu VM, and then deploying to an Ubuntu prod VM, so the building issues on MacOS don't matter to me.
I agree with @raarts - requiring 'sudo' to do a build seems very wrong. It raises all sorts of red flags, and potential problems. There's obviously some type of privileges issue somewhere, but why only on MacOS? What exactly is it trying to run that it can't unless run as a privileged user?
Anyhow, I'll try distillery, and see if that will work for me. Thanks for the input!
I've never had to use sudo with either exrm or distillery on OSX, so it's not clear to me what's causing this to occur as I'm unable to reproduce.
On linux I would use something like strace -f -e trace=file mix release
to check which file is being accessed. If only I knew how to do this on OSX....
I came across this same problem yesterday. I resisted trying the sudo solution because I'm suspicious of anything that requires sudo from a security perspective and because I figured there could be unmalicious but annoying file ownership side effects. I added some debugging code and determined that the problem was occurring somewhere within the relx run. I also saw another problem report to the relx application developers that indicated that they sometimes have these file permission issues when creating the release. https://github.com/erlware/relx/issues/120
Since I have a deadline and mostly narrowed down where the problem was, I gave up and just used sudo.
Keep in mind that after you recompile everything with sudo that you'll need to go back and chown everything back to your regular user.
I'm following the Advanced Deployment instructions here: http://www.phoenixframework.org/docs/advanced-deployment, and I keep running into the same error when building the actual release.
I'm able to run the following successfully:
Then, when I run MIX_ENV=prod mix release, I get the following error:
It's my understanding that :eacces indicates a file system permissions issue. I've checked the filesystem permissions, it all looks correct. All directories are 755; files are 644; everything is owned by me. I also moved the entire code base to a volume on my computer where I've set the volume to ignore ownership. All to no avail.
I'm at a loss at this point. I'm guessing it's either something simple, something obvious, or both, but I just can't see it. Any help would be appreciated.
OS:
macOS Sierra (Darwin mariposa.local 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64)
Elixir:
Phoenix 1.2.1
mix.exs:
Thanks!
-Tyler