File permission error unpacking ContamFMU on Linux

asked 2017-01-10 10:32:17 -0500

Stuart Dols gravatar image

I'm porting co-simulation between EnergyPlus and CONTAM from Windows to Linux. When EnergyPlus extracts the FMU, the file permissions are not maintained. Executable permissions are removed from both the contamx.exe executable and the shared object file located in the binaries/linux64 folder of the FMU.

I receive the following error:

sh: 1: tmp-fmus/ContamFMU.fmu_ContamFMU/binaries/linux64/contamx3.exe: Permission denied

If I simply extract the files from the FMU directly, permissions are retained.

I am assuming there is some linux setting I've not set correctly, but I am no linux expert. I am running Ubuntu 14.04 in a VirtualBox.

Any help would be much appreciated.

edit retag flag offensive close merge delete


I'm not an expert, but familiar with Ubuntu. My theory here is that when 'you' unpack it, your permissions are applied. But when the energyplus process tries, it doesn't have the permission. That sounds right. There may be a linux setting for that sort of thing, but I wouldn't bother look for it. It would be quicker just to edit the permissions on the extracted executable directly. $ sudo chmod u+x y.exe Another option is try prefixing the energyplus extraction command with 'sudo'. If you are not doing so already, that might give the subprocess the permission to make the .exe's executable

TomB gravatar image TomB  ( 2017-01-11 00:31:49 -0500 )edit