Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

gvm failed to install new versions - Permission denied #262

Closed
fkorssjoen opened this Issue · 19 comments

10 participants

@fkorssjoen

Hi, i'm having troubles when trying to install new versions of grails.

gvm install grails 2.3.6

Downloading: grails 2.3.6

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 129M 100 129M 0 0 229k 0 0:09:35 0:09:35 --:--:-- 248k

Installing: grails 2.3.6
__gvmtool_install_candidate_version:9: permission denied: mv
Done installing!

  • Tried reinstalling gvm
  • After running the gvm command, I can no longer run any other OS commands in the shell.
  • Before running the gvm command, everything is normal.
  • I used gvm frequently installing and switching grails versions.
  • I'm using MacOs

Please give me any hints!

Thanks.

@fkorssjoen

Digging into the code, I saw that the function located in gvm-install.sh :

function __gvmtool_install_candidate_version {
    CANDIDATE="$1"
    VERSION="$2"
    __gvmtool_download "${CANDIDATE}" "${VERSION}" || return 1
    echo "Installing: ${CANDIDATE} ${VERSION}"

    mkdir -p "${GVM_DIR}/${CANDIDATE}"

    unzip -oq "${GVM_DIR}/archives/${CANDIDATE}-${VERSION}.zip" -d "${GVM_DIR}/tmp/"
    mv "${GVM_DIR}"/tmp/*-${VERSION} "${GVM_DIR}/${CANDIDATE}/${VERSION}"
    echo "Done installing!"
    echo ""
}

The problem was that "mv" line, if you complete the process manually there's no problem:

➜  ~  mv "${GVM_DIR}"/tmp/grails-2.1.0 "${GVM_DIR}/grails/2.1.0" 
➜  ~  gvm use grails 2.1.0

Using grails version 2.1.0 in this shell.

I've tried in several ways to modify that line with no success, still having the same error but with the "sed" and "tr" functions.

Hope that works for the rest of you. If you consider this an issue related to my environment, os, please close it.

Regards.

Trygve.

@marcoVermeulen

Seems very odd. Nobody else has reported this and the entire test suite is green, so I presume it's an environmental issue.

@rcardoso

I'm facing a similiar problem on my mac os.

gvm install grails 2.3.7

Installing: grails 2.3.7
-bash: /bin/mv: Permission denied
Done installing!

then i try

grails -version

Grails version: 2.3.6

@germanb

I'm having the same issue.
Moving the file as fkorssjoen said worked for me

@horaciob

This error still happening,

I had to move file like fkorssjoen said.

@marcoVermeulen

I would really like to look into this, but I will need to know more about your systems. Are you all on Mac? Are you all using bash as default shell? Have you installed GVM with the normal method of curl -s get.gvmtool.net | bash?

Please furnish me with any extra detail that you can think of that diverges from a standard setup (we have 47272 minus 4 happy users that are not experiencing this). As soon as I have more details I can start helping to fix this.

@fkorssjoen

Hi Marco,

3 out of 4 people having this issue work in the same company as I do. I will talk with the security department people that installed and manages trend micro security and perhaps more software that could be causing this troubles.

Thanks!

@marcoVermeulen

Cool, please let me know so we can close this issue.

@marcoVermeulen

Okay, no reply so I'm closing this one off.

@nciapponi

Hi, I´m having the same issue. I'm running it on an Mac OSx environment and trying to install grails 2.3.6

@dudesl

The same issue!!! Fixin whit @fkorssjoen tip....im work in the same company...pretty odd :octopus:

@marcoVermeulen

Possibly a permissions issue with the image that your company is installing on it's macs?

@lucasperalta

same issue here, I have admin permissions on my mac

is weird. I tested in a laptop with ubuntu and is working fine, but with mac nope!

btw i have OS mavericks installed

update:

more weird stuff I 've tried in another Mac with mavericks ....and it's working!!

so probably is a permission issue
maybe adding sudo to mv "${GVM_DIR}"/tmp/*-${VERSION} "${GVM_DIR}/${CANDIDATE}/${VERSION}" could fix this,I will try and tell you what happens

@hernandezjd

Same issue OS X 10.9.5.

Has anyone solved the issue?

@dudesl

I'm installing a version of grails 2.2.0 with gvm and error has apparently disappeared. Fixed? Great!

@marcoVermeulen

Nope, nothing has changed. There seems to be something strange going on with some macs. Did you install OSX yourself, or did your company install a pre-built image for you?

@fkorssjoen

Just the standard image + company purchased software. I'm quite sure the antivirus caused that problem.

@marcoVermeulen

Makes sense yes.

@cknoblauch

I work at the same company at some of the previous commenters and I can confirm that after switching from TrendMicro to a different antivirus I no longer have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.