Gd stash wrong directory

broken image
broken image

mkdir.native world 0o775 lindig wheel Error: creating world failed: can't set uid/gid for 'world' $ ls -ld hello drwxrwxr-x 2 lindig everyone 68 Oct 9 18:18 hello Interface

broken image

mkdir.native hello 0o775 lindig everyone $. This is my attempt to find a solution in OCaml that captures the essence in a compact form, yet also takes error handling seriously.į or testing, the implementation provides a command line interface: $. The task concisely outlined above is easily burried in a maze of if-then-else, exception handling, and error reporting. And if it exists already, fix permissions and ownership when necessary or fail otherwise while giving a good reason.Īs it turns out, this requires at least 7 system calls: stat, mkdir, getgrnam, getpwnam, rmdir, chmod, chown and each can go wrong. What could go wrong? Create a directory with a given set of permissions and ownership.