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 config option for ChownCopiedFiles #677

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/containers.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ By default this will be configured relative to where containers/storage store
containers. This convention is followed by the default volume driver, but may
not be by other drivers.

**chown_copied_files**=true

Determines whether file copied into a container will have changed ownership to
the primary uid/gid of the container.

## SERVICE DESTINATION TABLE
The `service_destinations` table contains configuration options used to set up remote connections to the podman service for the podman API.

Expand Down
4 changes: 4 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ type EngineConfig struct {
// will refer to the plugin as) mapped to a path, which must point to a
// Unix socket that conforms to the Volume Plugin specification.
VolumePlugins map[string]string `toml:"volume_plugins,omitempty"`

// ChownCopiedFiles tells the container engine whether to chown files copied
// into a container to the container's primary uid/gid.
ChownCopiedFiles bool `toml:"chown_copied_files"`
}

// SetOptions contains a subset of options in a Config. It's used to indicate if
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
c.LockType = "shm"
c.MachineEnabled = false

c.ChownCopiedFiles = true

return c, nil
}

Expand Down