From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Description of problem: When dos2unix or unix2dos is run on a file, it resets the file owner and group to the current user and clears out any ACLs defined on that file. Version-Release number of selected component (if applicable): 3.1-21 How reproducible: Always Steps to Reproduce: 1. Create a file as root. 2. Change the owner and group on that file to non-root. 3. Define an ACL on that file. 4. Run "dos2unix file" or "unix2dos file". Actual Results: File is owned by root:root, no ACLs. Expected Results: File retains its owner, group and ACL information. Additional info:
Seems to be still valid in F8 (unix2dos-2.2-29.fc8): # ls -al test -rw-rwxr-- 1 pok pok 8 2007-10-29 19:33 test # unix2dos test unix2dos: converting file test to DOS format ... # ls -al test -rw-rwxr-- 1 root root 10 2007-10-29 19:42 test Please note when I run the "unix2dos" as a "pok" user, owner and group is not changed.
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
To preserve this information use dos2unix in this manner: dos2unix -n infile outfile cat outfile > infile rm -f outfile (and similarly for unix2dos)