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 troubleshooting statement for homedirs mounted noexec #2137

Merged
merged 1 commit into from Jan 13, 2019

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jan 10, 2019

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1651228

Users were surprised when they were not able to run a contianer on a noexec homedir.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

@rhatdan rhatdan changed the title Add troubleshooting statement for homedirs mounted /noexec Add troubleshooting statement for homedirs mounted noexec Jan 10, 2019
@rhatdan
Copy link
Member Author

rhatdan commented Jan 10, 2019

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2019
@rhatdan
Copy link
Member Author

rhatdan commented Jan 10, 2019

@TomSweeneyRedHat @mheon PTAL


#### Symptom

If you are running podman or buildah on a home directory that is mounte noexec,
Copy link
Member

Choose a reason for hiding this comment

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

mounte -> mounted

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

#### Symptom

If you are running podman or buildah on a home directory that is mounte noexec,
then they will fail. something like
Copy link
Member

Choose a reason for hiding this comment

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

Maybe "with a message like" instead of something like?

Copy link
Member

Choose a reason for hiding this comment

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

And please cap the start of it.


#### Symptom

If you are running podman or buildah on a home directory that is mounte noexec,
Copy link
Member

Choose a reason for hiding this comment

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

Podman or Buildah

@@ -143,3 +143,23 @@ If you are using a useradd command within a Dockerfile with a large UID/GID, it
#### Solution

If the entry in the Dockerfile looked like: RUN useradd -u 99999000 -g users newuser then add the `--log-no-init` parameter to change it to: `RUN useradd --log-no-init -u 99999000 -g users newuser`. This option tells useradd to stop creating the lastlog file.

Copy link
Member

Choose a reason for hiding this comment

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

Need to add the line break, title and short description. Perhaps:

---
### 7) Permission denied when running Podman commands
When the container doesn't have permission to mount the storage directory for the container a permission error will be raised.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

path that's not in a noexec mount. Copying /etc/containers/storage.conf to
~/.config/containers/ (creating the directory if necessary), you can adjust
the paths to graphroot to a directory that is not on a noexec mount, your user
has read/write privileges on, and is not on a tmpfs.
Copy link
Member

Choose a reason for hiding this comment

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

I'm having trouble parsing the last sentence. Perhaps:
"Simply copy the file /etc/containers.storage.conf to ~/.config/containers/ (creating the directory if necessary) ensuring the specified directory is not on a noexec mount, your user has read/write privileges to it, and it is not on tmpfs."

Copy link
Member Author

Choose a reason for hiding this comment

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

Reworded.

@rhatdan rhatdan force-pushed the noexec branch 2 times, most recently from 9dd3ff8 to dd7e4c4 Compare January 11, 2019 13:31

#### Solution

Since the administrator of the system setup your home directory to be noexec, you will not be allowed to execute containers from storage in your home directory. It is possible to work around this by manually specifying a container storage path that is not on a noexec mount. Simply copy the file /etc/containers/storage.conf to ~/.config/containers/ (creating the directory if necessary). Specify a directory which is not on a noexec mount and you user have read/write privileges to for the graphroot. You will need to modify other fields to writable directories as well.
Copy link
Member

Choose a reason for hiding this comment

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

One nit, then gtg. "you user have" to "the user has" or perhaps "your user has"?


#### Solution

Since the administrator of the system setup your home directory to be noexec, you will not be allowed to execute containers from storage in your home directory. It is possible to work around this by manually specifying a container storage path that is not on a noexec mount. Simply copy the file /etc/containers/storage.conf to ~/.config/containers/ (creating the directory if necessary). Specify a directory which is not on a noexec mount and you user have read/write privileges to for the graphroot. You will need to modify other fields to writable directories as well.
Copy link
Member

Choose a reason for hiding this comment

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

Should tell them to set graphroot and runroot specifically. And probably to set driver to VFS so they don't try using normal overlayfs as non-root

Copy link
Member Author

Choose a reason for hiding this comment

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

I added an example with overlay and fuse, since I think this is what we should recommend.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1651228

Users were surprised when they were not able to run a contianer on a noexec homedir.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@TomSweeneyRedHat
Copy link
Member

LGTM, if @mheon is hip.

@mheon
Copy link
Member

mheon commented Jan 13, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2019
@openshift-merge-robot openshift-merge-robot merged commit 9ada972 into containers:master Jan 13, 2019
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants