diff --git a/unix/operations.lisp b/unix/operations.lisp
index b7a85cd..4d678d2 100644
--- a/unix/operations.lisp
+++ b/unix/operations.lisp
@@ -125,10 +125,9 @@
(g (if group
(resource-id group)
gid)))
- (declare (type string u)
- (type (or null string) g))
+ (declare (type (or null string) u g))
(run "chown "
- (sh-quote u)
+ (when u (sh-quote u))
(when g `(":" ,(sh-quote g)))
" "
(sh-quote (resource-id res)))))