Bug 169045 - dos2unix resets file owner, ACLs
Summary: dos2unix resets file owner, ACLs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dos2unix
Version: 4.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-09-22 14:42 UTC by Josh Kelley
Modified: 2009-11-12 10:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-12 10:47:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Josh Kelley 2005-09-22 14:42:46 UTC
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:

Comment 1 Jan Hutař 2007-10-29 18:50:48 UTC
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.

Comment 4 RHEL Program Management 2008-10-31 16:39:30 UTC
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 "?".

Comment 5 Tim Waugh 2009-11-12 10:47:12 UTC
To preserve this information use dos2unix in this manner:

dos2unix -n infile outfile
cat outfile > infile
rm -f outfile

(and similarly for unix2dos)


Note You need to log in before you can comment on or make changes to this bug.