diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-04-20 09:16:38 +0400 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-04-20 09:16:38 +0400 |
commit | 6ebd63382931ce047de3f801e9cb0ae41007242c (patch) | |
tree | 1e3bb4b71ad1e841c69b4801d46e5f9963cf9764 /libbb/copy_file.c | |
parent | 46cd74b9e3bf0ed842f4e6f2e5a8b8f364e3ad4c (diff) |
Set permissions of created file
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r-- | libbb/copy_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index eb9cb1a16..7e5d11e67 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); |