diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 97c9c02f0729..83a31c7d92fc 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -148,7 +148,7 @@ done: argv += optind; fts_options |= FTS_LOGICAL; } } else - fts_options = FTS_LOGICAL; + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; if (hflag) change_mode = lchmod; diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index b86af0e42730..87eb8c25f34d 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -133,7 +133,7 @@ main(argc, argv) fts_options |= FTS_LOGICAL; } } else - fts_options = FTS_LOGICAL; + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; uid = gid = -1; if (ischown) {