()
| 216 | } |
| 217 | |
| 218 | func (n *NFSServerSetup) validateDir() error { |
| 219 | info, err := os.Stat(n.nfsDir) |
| 220 | if err != nil { |
| 221 | return fmt.Errorf("cannot access %s -> %w", n.nfsDir, err) |
| 222 | } |
| 223 | if !info.IsDir() { |
| 224 | return fmt.Errorf("%s is not a directory", n.nfsDir) |
| 225 | } |
| 226 | return nil |
| 227 | } |
| 228 | |
| 229 | func (n *NFSServerSetup) removeAppendOnlyAttribute() error { |
| 230 | args := []string{n.nfsDir, "-type", "d", "-exec", "chattr", "-a", "{}", ";"} |