Bug 169045 - dos2unix resets file owner, ACLs
dos2unix resets file owner, ACLs
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dos2unix (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-22 10:42 EDT by Josh Kelley
Modified: 2009-11-12 05:47 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-12 05:47:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Josh Kelley 2005-09-22 10:42:46 EDT
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 14:50:48 EDT
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 Product and Program Management 2008-10-31 12:39:30 EDT
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 05:47:12 EST
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.