[Bugs] [Bug 1309342] New: Wrong permissions set on previous copy of truncated files inside trash directory

bugzilla at redhat.com bugzilla at redhat.com
Wed Feb 17 14:21:17 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1309342

            Bug ID: 1309342
           Summary: Wrong permissions set on previous copy of truncated
                    files inside trash directory
           Product: GlusterFS
           Version: mainline
         Component: trash-xlator
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: anoopcs at redhat.com
                CC: bugs at gluster.org



Description of problem:

Enabling trash feature for a volume is resulting in wrong permissions being set
on previous copy of a truncated file for which a corresponding path does not
exists under trash directory. This only happens for the first truncation of
file under same directory hierarchy. Subsequent truncations creates previous
copies with correct permissions.

Version-Release number of selected component (if applicable):
mainline

How reproducible:
always

Steps to Reproduce:
1. Create, start and mount a simple distributed volume.
2. Enable trash for the volume and change to mount point.
# gluster volume set <VOLNAME> features.trash on
3. Create a temporary directory under root.
# mkdir tmp
4. Create a file inside tmp/ with some content.
# echo 'Hello, World' > tmp/foo
5. Change permissions on tmp/foo
# chmod 0777 tmp/foo
5. truncate tmp/foo
# truncate -s 3 tmp/foo
6. Check the permissions of the previous copy of foo created inside
.trashcan/tmp/
# ls -l .trashcan/tmp

Actual results:
.trashcan/tmp/foo_xxxx has different permissions than that of tmp/foo

Expected results:
.trashcan/tmp/foo_xxxx and tmp/foo should match their permission bits.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list