Score:0

Same bash script failed on VirtualBox but not on native Linux machine

in flag

Here is the problem with unclear source: I am running same bash script to generate OpenApi modules in Ubuntu 22.04 LTS Virtual Box and on my private computer, where I have Ubuntu as the main operating system. That is repository of project: https://github.com/5G-MAG/rt-5gms-application-function

Script that fails to execute on VB is ~/rt-5gms-application-function/src/5gmsaf/generator-5gmsaf.sh. Basically it retrieve moudules from OpenApi, creating subfolder which is later used to install application. However here is main issue after executing generator-5gmsaf.sh:

rt-5gms-application-function/src/5gmsaf/../../subprojects/rt-common-shared/5gms/scripts/generate_openapi: 285: : Permission denied

Same script runs with no problem on private machine. Make sense to run it as the root, so I've tried privilegies modifications (adding sudoers, chmod 755 etc) but it's not about running it as the root. Also, I've reconfigured network for my VirtualBox but it's stil not working.

Any ideas why such a difference in performance in VirtualBox and native Linux machine?

ar flag
It is hard to say why, without looking at the script itself. It looks like the the script `generator-5gsmaf.sh` calls another script `generate_openapi`, and that script fails at line 285. At least that's what I think is happening. So, i would start from there and go backward to what happened before that line. Also edit your question and indicate if the VB instance of Ubuntu is a standard install or a pre-installed version, for example with username "ubuntu" or something line that.
raj avatar
cn flag
raj
Scripts are always highly dependent on the environment, because they call other programs that may or may not be present, permissions may be different etc. The script that works on your physical Linux machine might fail if you move it to another physical Linux machine. It's not physical versus virtual machine, it's just one system versus another. You should always test and adjust scripts for particular environment.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.