Copying file to an OCFS2 file system using rsync result in wrong ownership of symlinks

Bug #191942 reported by Etienne Goyer
4
Affects Status Importance Assigned to Milestone
ocfs2-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Not sure if this should be filed against linux-meta (if it is an OCFS2 bug) or against rsync, so I left the package field blank.

When copying files to an OCFS2 filesystem using rsync, ownership of symlinks is not preserved correctly. Strangely, running rsync a second time would fix the ownership. This problem have been isolated to using rsync and OCFS2 in conjunction, as ownership of symlinks is preserved correctly on the same machine when either rsync'ing to an ext3 file system, or when copying to an OCFS2 volume using other means (such as cp). The symptoms have been observed in both gutsy and hardy.

uname -a: Linux ocfs2-hardy-node1 2.6.24-5-server #1 SMP Thu Jan 24 19:58:47 UTC 2008 x86_64 GNU/Linux

Steps to reproduce
------------------------

1. Install hardy, create an OCFS2 volume and mount it under /data (for example)

2. Setup a rsyncd server, and create a module where files, including synlinks, are not owned by root (owned by ftp:ftp in my example here)

3. rsync the files to your OCFS2 volume. the command line i use is:

    sudo rsync -avz 192.168.1.10::rsync-test /data/rsync-test/

4. ls -l /data/rsync-test -> notice that file ownership are correct, except for symlinks which are owned by root:root instead of ftp:ftp as they should

5. Run the rsync command above a second time.

6. ls -l /data/rsync-test -> notice that all files, including symlinks, are now owned correctly by ftp:ftp

7. rsync to a location that is on an ext3 file system now (/home/test in this example)

    sudo rsync -avz 192.168.1.10::rsync-test /home/test/

8. ls -l /home/test -> notice all file ownership are correct, including symlinks

9. Copy the file to the OCFS2 volume using some other mean (in this example, using cp from a NFS mount)

    sudo rm -rf /data/rsync-test/*
    sudo mount 192.168.1.10:/data /mnt
    sudo cp -a /mnt/* /data/rsync-test/

10. ls -l /data/rsync-test -> notice all file ownership are correct, including symlinks

Revision history for this message
Bevo (psynode) wrote :

i have also noticed a similar issue but mine is just with symlinks and ocfs in general:
say /opt is my mounted ocfs2 partition

node1:# ln -s /opt/blah /etc/issue
node1:# ls -lah /opt/blah
lrwxrwxrwx 1 root root 10 2008-04-15 22:26 /opt/blah -> /etc/issue

node2:# ls -lah /opt/blah
lrwxrwxrwx 1 root root 10 2008-04-15 22:26 /opt/blah -> /etc/issue

Then say i change the ownership of the symlink
node1:# chown -h user1 /opt/blah
node1:# ls -lah /opt/blah
lrwxrwxrwx 1 user1 root 10 2008-04-15 23:30 /opt/blah -> /etc/issue

But the ownership on any of the other nodes has not been updated:
node2:# ls -lah /opt/blah
lrwxrwxrwx 1 root root 10 2008-04-15 22:26 /opt/blah -> /etc/issue

This however is not the case with regular files, updating the ownership on a standard file is fine across all nodes

Revision history for this message
sunil (smushran) wrote :

http://oss.oracle.com/bugzilla/show_bug.cgi?id=963

The fix is in the bugzilla. Will be pushed upstream soon.

Changed in ocfs2:
status: Unknown → Fix Released
Revision history for this message
Daniel T Chen (crimsun) wrote :

According to rmadison, this issue has been fixed since hardy was released. Is that true?

Changed in ocfs2-tools:
status: New → Incomplete
Revision history for this message
Neil Perry (nperry) wrote :

We are closing this bug report as there hasn't been any activity. Please upgrade to the latest release Karmic 9.10 - If this bug is still reproducible please set Status to New. Thanks

Changed in ocfs2-tools (Ubuntu):
status: Incomplete → Invalid
Changed in ocfs2:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.