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

The current release tgz will leads to wrong ownership #172

Open
xtay573269555 opened this issue Mar 22, 2024 · 1 comment
Open

The current release tgz will leads to wrong ownership #172

xtay573269555 opened this issue Mar 22, 2024 · 1 comment

Comments

@xtay573269555
Copy link

The current release tgz file tidy-viewer-1.5.2.tgz will leads to wrong ownership(1000:1000) for /root after extracting it if you are in /root directory.

@alexhallam
Copy link
Owner

Thanks for opening this.

I will look into how the tarball is created and ensure that it doesn't contain specific metadata about ownership or permissions that could affect the system it's extracted on.

This might involve changing tarball creation commands or settings to avoid preserving the original file's ownership and permissions.

I think what is going on is that there is a permission related to the staging folder. Maybe if I change the permissions this would fix the issue.

Here is the problem line.

tar czf "$staging.tar.gz" "$staging"

Maybe I should add something like this before running tar.

chmod -R 755 $staging  # This command recursively sets read, write, and execute permissions
chown -R root:root $staging  # This command recursively changes the owner and group of the staging directory to root.

To the best of my knowledge, these commands ensure that the files and directories within staging have a consistent and expected set of permissions and ownership before being archived.

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

No branches or pull requests

2 participants