Description of problem: it is possible to delete a file in immutable and undeletable state on a file-based worm volume Version-Release number of selected component (if applicable): 3.11.2 How reproducible: [vagrant@client1 share]$ date && echo "testfile" >> testfile Wed Aug 30 09:18:06 CEST 2017 [vagrant@client1 share]$ date && rm testfile Wed Aug 30 09:18:15 CEST 2017 rm: cannot remove ‘testfile’: Read-only file system [vagrant@client1 share]$ date && touch -a testfile Wed Aug 30 09:18:23 CEST 2017 [vagrant@client1 share]$ date && rm testfile Wed Aug 30 09:18:24 CEST 2017 Steps to Reproduce: 1.create volume. enable file-based worm 2.features.worm-file-level: on features.default-retention-period: 60 features.auto-commit-period: 5 3.follows steps in "how reproducible" Actual results: the file was deleted Expected results: it should not be possible to delete files in immutable undeletable state Additional info:
Created attachment 1320839 [details] sosreport client sosreport client
Created attachment 1320840 [details] sosreport server
This is not bug. It is behaving as expected. You can see the "Updating the retention time" section in the blog http://blog.gluster.org/2016/07/worm-write-once-read-multiple-retention-and-compliance-2/ Once a file becomes worm-retained and you want to change the retention period (till when it should be undeletable) of the file, you can use the "touch -a" or "touch -t" or any other equivalent commands which updates the access time of the file. We depend on the access time of the file to convert it from worm-retained to worm state. In your case, when you did the "touch -a testfile" it updated the access time of the file to the current time. So after that the next "rm testfile" command did the transition from worm-retained to worm state since the retention period was expired, and deleted the file.
This bug reported is against a version of Gluster that is no longer maintained (or has been EOL'd). See https://www.gluster.org/release-schedule/ for the versions currently maintained. As a result this bug is being closed. If the bug persists on a maintained version of gluster or against the mainline gluster repository, request that it be reopened and the Version field be marked appropriately.