Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 47484

Summary: dos2unix and unix2dos change permissions
Product: Gentoo Linux Reporter: Tom Felker <tcfelker>
Component: [OLD] UnspecifiedAssignee: Daniel Black (RETIRED) <dragonheart>
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Tom Felker 2004-04-10 22:27:55 UTC
dos2unix and unix2dos always change the permissions of the files they act on to 0600 (rw-------).  Instead, they should leave them the same.

Reproducible: Always
Steps to Reproduce:
$ touch test
$ ll test
-rw-r--r--    1 tom      users           0 Apr 11 00:19 test
$ unix2dos test
unix2dos: converting file test to DOS format ...
$ ll test
-rw-------    1 tom      users           0 Apr 11 00:19 test

Actual Results:  
The file has mode 0600

Expected Results:  
The file should have its original permissions, in this case 0644.  If
remembering the mode isn't possible, it should at least set the permissions to
0666 & ~umask.
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-04-18 02:08:32 UTC
app-text/dos2unix or app-text/hd2u?
Comment 2 Daniel Black (RETIRED) gentoo-dev 2004-04-24 15:20:14 UTC
app-text/hd2u doesn't suffer this permission problem. However it only has dos2unix (and not unix2dos or mac stuff). Is this acceptable?
Comment 3 Daniel Black (RETIRED) gentoo-dev 2004-05-04 18:19:50 UTC
app-text/dos2unix seems to have no maintainer upstream. While it is possible to write a bit of C code to fix the problem you have described the app-text/hd2u seems compatible to a large extent and does the same function.