()
| 227 | } |
| 228 | |
| 229 | func (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 | |
| 239 | func (n *NFSServerSetup) changeDirOwnership(username string) error { |
| 240 | if output, err := cmd.NewExecutor("", "chown", "-R", username+":"+username, n.nfsDir).ExecuteOutput(); err != nil { |
no test coverage detected