Lucio Andrés Illanes Albornoz b0e81e
diff --git a/pax/file_subs.c b/pax/file_subs.c
Lucio Andrés Illanes Albornoz b0e81e
index be8d065..41ffd57 100644
Lucio Andrés Illanes Albornoz b0e81e
--- a/pax/file_subs.c
Lucio Andrés Illanes Albornoz b0e81e
+++ b/pax/file_subs.c
Lucio Andrés Illanes Albornoz b0e81e
@@ -823,7 +823,7 @@ set_attr(const struct file_times *ft, int force_times, mode_t mode,
Lucio Andrés Illanes Albornoz b0e81e
 	 * so do *not* use O_NOFOLLOW.  The dev+ino check will
Lucio Andrés Illanes Albornoz b0e81e
 	 * protect us from evil.
Lucio Andrés Illanes Albornoz b0e81e
 	 */
Lucio Andrés Illanes Albornoz b0e81e
-	fd = open(ft->ft_name, O_RDONLY | O_DIRECTORY);
Lucio Andrés Illanes Albornoz b0e81e
+	fd = open(ft->ft_name, O_RDWR | O_DIRECTORY);
Lucio Andrés Illanes Albornoz b0e81e
 	if (fd == -1) {
Lucio Andrés Illanes Albornoz b0e81e
 		if (!in_sig)
Lucio Andrés Illanes Albornoz b0e81e
 			syswarn(1, errno, "Unable to restore mode and times"
Lucio Andrés Illanes Albornoz f303ba
--- baseutils/pax/Makefile.orig	2020-01-28 21:00:25.410023800 +0100
Lucio Andrés Illanes Albornoz f303ba
+++ baseutils/pax/Makefile	2020-01-28 21:01:19.691416800 +0100
Lucio Andrés Illanes Albornoz f303ba
@@ -18,12 +18,7 @@
Lucio Andrés Illanes Albornoz f303ba
 	${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
Lucio Andrés Illanes Albornoz f303ba
 
Lucio Andrés Illanes Albornoz f303ba
 install:
Lucio Andrés Illanes Albornoz f303ba
-	install -c -s -m 555 ${PROG} ${PREFIX}/bin/${PROG}
Lucio Andrés Illanes Albornoz f303ba
-	install -c -s -m 555 ${PROG} ${PREFIX}/bin/tar
Lucio Andrés Illanes Albornoz f303ba
-	install -c -s -m 555 ${PROG} ${PREFIX}/bin/cpio
Lucio Andrés Illanes Albornoz f303ba
-	install -c -m 444 ${PROG}.1 ${MANDIR}/man1
Lucio Andrés Illanes Albornoz f303ba
-	install -c -m 444 tar.1 ${MANDIR}/man1
Lucio Andrés Illanes Albornoz f303ba
-	install -c -m 444 cpio.1 ${MANDIR}/man1
Lucio Andrés Illanes Albornoz f303ba
+	
Lucio Andrés Illanes Albornoz f303ba
 
Lucio Andrés Illanes Albornoz f303ba
 clean:
Lucio Andrés Illanes Albornoz f303ba
 	rm -f ${PROG} ${OBJS}