aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2014-09-18 13:05:21 -0500
committerIsaac Dunham <ibid.ag@gmail.com>2014-09-18 13:05:21 -0500
commit7e96783ee7ea149d157f14151a8c2592c36f074e (patch)
tree32a8badb8e1080bdf24fffa725ca71d1d15e083d /toys
parent14a11ed5ebfb2309a3fdfea1ce7a741519e44693 (diff)
downloadtoybox-7e96783ee7ea149d157f14151a8c2592c36f074e.tar.gz
rm -rf needs to chmod directories to u+rwx, because directories need +x to search.
(Fixes messages about not being able to delete directories when running make test).
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/rm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/rm.c b/toys/posix/rm.c
index 6c984046..9561a670 100644
--- a/toys/posix/rm.c
+++ b/toys/posix/rm.c
@@ -49,7 +49,7 @@ static int do_rm(struct dirtree *try)
if (dir) {
// Handle chmod 000 directories when -f
if (faccessat(fd, try->name, R_OK, AT_SYMLINK_NOFOLLOW)) {
- if (toys.optflags & FLAG_f) wfchmodat(fd, try->name, 0600);
+ if (toys.optflags & FLAG_f) wfchmodat(fd, try->name, 0700);
else goto skip;
}
if (!try->again) return DIRTREE_COMEAGAIN;