[Bugs] [Bug 1480788] New: File-level WORM allows mv over read-only files

bugzilla at redhat.com bugzilla at redhat.com
Fri Aug 11 21:26:56 UTC 2017


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

            Bug ID: 1480788
           Summary: File-level WORM allows mv over read-only files
           Product: GlusterFS
           Version: 3.10
         Component: unclassified
          Severity: high
          Assignee: bugs at gluster.org
          Reporter: luneo7 at gmail.com
                CC: bugs at gluster.org



Description of problem:

It is possible to move one recently created file over a read only file,
overwriting it.

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

3.10 and 3.11

How reproducible:


Steps to Reproduce:

1. create a worm volume file level
$ gluster volume create v1 replica 3 172.17.0.{2,3,4}:/mnt/v1 force
$ gluster volume set v1 features.read-only "off"
$ gluster volume set v1 features.worm "off"
$ gluster volume set v1 features.worm-file-level "on"
$ gluster volume set v1 features.retention-mode relax
$ gluster volume set v1 features.auto-commit-period 20
$ gluster volume set v1 features.default-retention-period 600
$ gluster volume start v1
$ mount -t glusterfs 172.17.0.2:/v1 /home/lucas/storage

Volume Name: v1
Type: Replicate
Volume ID: 72a968d9-9aaa-4cde-9954-4e5a91065abf
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: 172.17.0.2:/mnt/v1
Brick2: 172.17.0.3:/mnt/v1
Brick3: 172.17.0.4:/mnt/v1
Options Reconfigured:
features.default-retention-period: 600
features.auto-commit-period: 20
features.retention-mode: relax
features.worm-file-level: on
features.worm: off
features.read-only: off
transport.address-family: inet
nfs.disable: on

2. create file on WORM volume (File Level)
$ cd /home/lucas/storage
$ echo "Hello World" > testfile

3. wait for the auto commit time and try to delete it
$ rm testfile
rm: cannot remove 'testfile': Read-only file system

4. create a new file and do a mv command to overwrite the existing file
$ echo "Aloha" > testfile2
$ mv testfile2 testfile

Actual results:

- The mv command executes successfully and overwrites the read only file.

Expected results:

- The mv command should fail, giving some error regarding a read only file.

Additional info:

-- 
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