Bug 119350

Summary: dos2unix, mac2unix and unix2dos don't preserve permissions
Product: [openSUSE] SUSE Linux 10.1 Reporter: Andreas Hanke <andreas.hanke>
Component: BasesystemAssignee: Philipp Thomas <pth>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mlatimer
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andreas Hanke 2005-09-28 21:47:26 UTC
dos2unix, mac2unix and unix2dos don't preserve permissions.

Steps to reproduce:

$ cd /tmp

$ touch dos2unix.test
$ ls -l dos2unix.test
-rw-r--r--  1 user users 0 2005-09-28 23:38 dos2unix.test
$ dos2unix dos2unix.test
$ ls -l dos2unix.test
-rw-------  1 user users 0 2005-09-28 23:39 dos2unix.test

$ touch mac2unix.test
$ ls -l mac2unix.test
-rw-r--r--  1 user users 0 2005-09-28 23:40 mac2unix.test
$ mac2unix mac2unix.test
$ ls -l mac2unix.test
-rw-------  1 user users 0 2005-09-28 23:40 mac2unix.test

$ touch unix2dos.test
$ ls -l unix2dos.test
-rw-r--r--  1 user users 0 2005-09-28 23:41 unix2dos.test
$ unix2dos unix2dos.test
$ ls -l unix2dos.test
-rw-------  1 user users 0 2005-09-28 23:42 unix2dos.test

Fedora has a patch for it. There are also some other patches in their src.rpm,
some of which might be useful.

http://download.fedora.redhat.com/pub/fedora/linux/core/4/SRPMS/dos2unix-3.1-24.src.rpm
http://download.fedora.redhat.com/pub/fedora/linux/core/4/SRPMS/unix2dos-2.2-26.src.rpm
Comment 1 Philipp Thomas 2006-04-11 10:24:40 UTC
Patches from Fedora applied.
Comment 3 Philipp Thomas 2007-06-18 16:06:04 UTC
Reopenening to use NEEDINFO
Comment 8 Philipp Thomas 2007-07-12 14:02:38 UTC
OK, patch was accepted for SP4.