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

Add a note about sudo for cache #564

Closed
wants to merge 1 commit into from

Conversation

AlexWayfer
Copy link
Contributor

It seems not too obvious.

It seems not too obvious.
in the [user-specific cached data folder](https://golang.org/pkg/os/#UserCacheDir). [Similar to Cirrus Cloud](https://cirrus-ci.org/guide/writing-tasks/#http-cache)
the CLI can use a caching HTTP server for more efficient sharing of cached artifacts between tasks executed on different physical hosts.
in the [user-specific cached data folder](https://golang.org/pkg/os/#UserCacheDir).
Please note, that if you run `cirrus` under `sudo` (for example, in ArchLinux by default), check `/root` directories.
Copy link
Contributor

Choose a reason for hiding this comment

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

if you run cirrus under sudo (for example, in ArchLinux by default)

Care to elaborate on why is this a default for Arch Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess, security reasons. From the ArchLinux Wiki:

If you want to be able to run the docker CLI command as a non-root user, add your user to the docker user group, re-login, and restart docker.service.

Warning: Anyone added to the docker group is root equivalent because they can use the docker run --privileged command to start containers with root privileges. For more information see [3] and [4].

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, but I fail to see the how your quote implies that the sudo is default/should be used on Arch Linux. As we've previously discussed, consider running Cirrus CLI as a separate user and adding that user to the docker group instead if you're concerned about the docker attack vector.

Also, by default, the sudo invocation doesn't seem to actually change the $HOME:

% echo $HOME
/Users/edi
% sudo sh -c 'echo $HOME'   
/Users/edi

Do you have a different behavior on your system?

@edigaryev
Copy link
Contributor

Closing due to inactivity.

@edigaryev edigaryev closed this May 12, 2023
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.

2 participants