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

Unix: Fix binary permissions #103

Merged
merged 2 commits into from
Sep 3, 2023
Merged

Unix: Fix binary permissions #103

merged 2 commits into from
Sep 3, 2023

Conversation

USA-RedDragon
Copy link
Contributor

@USA-RedDragon USA-RedDragon commented Sep 1, 2023

The AppImage release of v2.3.3 errors while installing A1111 with An error occurred trying to start process '/home/user/Applications/Data/Assets/7zzs' with working directory '/home/user/Applications'. Permission denied

The permissions applied were -r----x--t. I found a typo in the permissions, but also the UnixFileMode (https://learn.microsoft.com/en-us/dotnet/api/system.io.unixfilemode) is an enum which doesn't cast from typical values like 0777.

I also noticed the permissions were overly permissive. This change also prevents group and other writes (0755).


File.SetUnixFileMode(UpdateHelper.ExecutablePath, (UnixFileMode) 0x755);
and
File.SetUnixFileMode(targetExe, (UnixFileMode) 0x755);
also have the same issue, so this PR addresses them

The AppImage release of v2.3.3 errors while installing A1111 with `An error occurred trying to start process '/home/user/Applications/Data/Assets/7zzs' with working directory '/home/user/Applications'. Permission denied`

The permissions applied were `-r----x--t`. I found a typo in the permissions, but also the `UnixFileMode` (https://learn.microsoft.com/en-us/dotnet/api/system.io.unixfilemode) is an enum which doesn't seem to cast from typical values like 0777.

I also noticed the permissions were intended to be _quite_ permissive. This change also prevents `group` and `all` writes.
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

CLA Assistant Lite bot CLA Assistant bot All Contributors have signed the CLA.

@USA-RedDragon USA-RedDragon changed the title Linux: Fix 7zzs permissions Unix: Fix binary permissions Sep 1, 2023
@USA-RedDragon
Copy link
Contributor Author

USA-RedDragon commented Sep 1, 2023

I have read the CLA Document and I hereby sign the CLA

Copy link
Member

@ionite34 ionite34 left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@ionite34 ionite34 merged commit 022b79d into LykosAI:main Sep 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2023
@USA-RedDragon USA-RedDragon deleted the fix-permissions branch September 3, 2023 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants