From 6ebd63382931ce047de3f801e9cb0ae41007242c Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Fri, 20 Apr 2001 05:16:38 +0000 Subject: Set permissions of created file --- libbb/copy_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libbb/copy_file.c b/libbb/copy_file.c index eb9cb1a..7e5d11e 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c @@ -147,6 +147,7 @@ copy_file(const char *src_name, const char *dst_name, } dst_file = fopen(dst_name, "w"); + chmod(dst_name, srcStatBuf.st_mode); if (dst_file == NULL) { if (!quiet_flag) { perror_msg("%s", dst_name); -- cgit v1.1