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

unset sticky bit when clearing working directory #483

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

pretendWhale
Copy link
Contributor

@pretendWhale pretendWhale commented Jan 22, 2024

During test setup, instructor files are copied to a worker directory. Any directories in the instructor files have the sticky bit set to prevent them from being deleted by worker users running student submissions.

However, if scripts copy directories from within instructor files to another location, the permissions (including the sticky bit) will be copied as well. Test cleanup is performed by a different user, and the presence of the sticky bit prevents deletion of such directories.

This PR explicitly unsets the sticky bit on all directories in the autotest worker directory before attempting to delete the contents of the directory, as part of other permissions changes required.

Tested by setting up an assignment which copies a directory from the instructor files to the current working directory. In current master, the folder remains after cleanup is attempted. With this PR, the folder is deleted as expected.

@donny-wong donny-wong added this to the v2.4.1 milestone Jan 23, 2024
Copy link
Contributor

@donny-wong donny-wong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix typo in changelog

@david-yz-liu david-yz-liu merged commit 4599eda into MarkUsProject:master Jan 25, 2024
1 check passed
donny-wong pushed a commit to donny-wong/markus-autotesting that referenced this pull request Feb 7, 2024
@pretendWhale pretendWhale modified the milestones: v2.4.1, v2.4.2 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants