MCPcopy Index your code
hub / github.com/celer-pkg/celer / removeAppendOnlyAttribute

Method removeAppendOnlyAttribute

pkgcache/cache_setup.go:229–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

227}
228
229func (n *NFSServerSetup) removeAppendOnlyAttribute() error {
230 args := []string{n.nfsDir, "-type", "d", "-exec", "chattr", "-a", "{}", ";"}
231 if _, err := cmd.NewExecutor("", "find", args...).ExecuteOutput(); err != nil {
232 return fmt.Errorf("failed to remove append-only attribute (chattr -a) from %q -> %w", n.nfsDir, err)
233 }
234
235 color.PrintHint("✔ remove append-only attribute (chattr -a) from %q", n.nfsDir)
236 return nil
237}
238
239func (n *NFSServerSetup) changeDirOwnership(username string) error {
240 if output, err := cmd.NewExecutor("", "chown", "-R", username+":"+username, n.nfsDir).ExecuteOutput(); err != nil {

Callers 2

SetupMethod · 0.95
RemoveMethod · 0.95

Calls 3

NewExecutorFunction · 0.92
PrintHintFunction · 0.92
ExecuteOutputMethod · 0.80

Tested by

no test coverage detected