Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve symlink when making log dir writable #4658

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, strict=True)
jfgrimm marked this conversation as resolved.
Show resolved Hide resolved
if os.path.exists(log_dir):
adjust_permissions(log_dir, stat.S_IWUSR, add=True, recursive=True)
else:
Expand Down
Loading