easybuilders / easybuild-framework

EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way.
https://easybuild.io
GNU General Public License v2.0
152 stars 203 forks source link

elevate permissions by default after extracting source tarball #2640

Open smoors opened 6 years ago

smoors commented 6 years ago

In the netMHCpan-4.0a.eb easconfig (PR https://github.com/easybuilders/easybuild-easyconfigs/pull/6991) I had to elevate the permissions after extracting the sources with the command chmod -R +rX *.

Since this command takes into account the umask (thus never elevates beyond what is specified by the umask), I see no reason why we cannot apply chmod command by default, or am I forgetting something?

boegel commented 6 years ago

@smoors Hmm, I'm not sure it's a good idea to blindly enable execution permissions recursively on all files...

This is really a bug in the netMHCpan source tarball, is it not?

smoors commented 6 years ago

@boegel its not a bug in netMHCpan: the permissions of the owner are correct. the command chmod -R +rX * does not enable execution permissions recursively on all files. instead, it changes all subdirectories and executables to +rx and all files to +r (notice the capital X).

boegel commented 6 years ago

Oh, ok, thanks for clarifying... The X is new to me :) In that case, I guess it makes sense...

There's a small complication though... We don't use chmod internally in EasyBuild, we have our own adjust_permissions function for this, which right now doesn't support something like X to elevate existing permissions to group/other.