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

[Bug]: Change permissions and ownership for the temp directories to be the same as the parent directory #636

Open
forsyth2 opened this issue Oct 28, 2024 · 4 comments
Labels
semver: bug Bug fix (will increment patch version)

Comments

@forsyth2
Copy link
Collaborator

What happened?

When checking disk usage, errors like du: cannot read directory 'ac.benedict/E3SMv3_dev/20231012.v3alpha04_bigrid_L80_QBO1.F20TR.chrysalis/post/scripts/tmp.407421.rCki': Permission denied. This is because of a permissions issues with the temp directories zppy creates.

What machine were you running on?

Chrysalis

Environment

N/A

What command did you run?

du

Copy your cfg file

N/A

What jobs are failing?

No response

What stack trace are you encountering?

No response

@forsyth2 forsyth2 added the semver: bug Bug fix (will increment patch version) label Oct 28, 2024
@xylar
Copy link
Contributor

xylar commented Oct 28, 2024

@forsyth2, while you're at it, could you give the tmp directories a more useful name (say including ts or climo or whatever the task is)? That would also help with debugging if something goes wrong.

It might be easiest to find something else you can call to generate a random hash for the end of the directory name, but then just use a normal mkdir call so permissions are unaffected.

@xylar
Copy link
Contributor

xylar commented Oct 28, 2024

mktemp --dry-run might be helpful for just generating the hash:

hash=`mktemp --dry-run -d XXXX`
work_dir=`mkdir tmp.ilamb.${id}.${hash}`

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Nov 1, 2024

@chengzhuzhang also noted that tmp directories with ... can't get deleted either. @xylar noted one possible cause for that is a regex parsing issue.

@xylar
Copy link
Contributor

xylar commented Nov 1, 2024

I think you probably need to delete them manually, finding the appropriate escape characters. Sometimes tab completion can tell you what they are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: bug Bug fix (will increment patch version)
Projects
None yet
Development

No branches or pull requests

2 participants