Skip to content

Commit

Permalink
Merge pull request easybuilders#4658 from jfgrimm/read-only-local-sym…
Browse files Browse the repository at this point in the history
…link

resolve symlink when making log dir writable
  • Loading branch information
boegel authored Sep 26, 2024
2 parents 03a7f3b + 61cba5f commit 8ff6ba0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4309,7 +4309,9 @@ def build_and_install_one(ecdict, init_env):
def ensure_writable_log_dir(log_dir):
"""Make sure we can write into the log dir"""
if build_option('read_only_installdir'):
# temporarily re-enable write permissions for copying log/easyconfig to install dir
# temporarily re-enable write permissions for copying log/easyconfig to install dir,
# ensuring that we resolve symlinks
log_dir = os.path.realpath(log_dir)
if os.path.exists(log_dir):
adjust_permissions(log_dir, stat.S_IWUSR, add=True, recursive=True)
else:
Expand Down

0 comments on commit 8ff6ba0

Please sign in to comment.