Bug 2232446

Summary: [cephfs][client] client allows to write with only read permission
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: julpark
Component: CephFSAssignee: Rishabh Dave <ridave>
Status: NEW --- QA Contact: Hemanth Kumar <hyelloji>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: ceph-eng-bugs, cephqe-warriors, ridave
Target Milestone: ---Flags: vshankar: needinfo? (ridave)
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description julpark 2023-08-16 23:18:52 UTC
Description of problem:

client allows to write in a dir with only read permissions

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

17.2.6-111.el9cp

How reproducible:

Create a client with only read permission in dir1 and mount and try to write something in the dir1

Steps to Reproduce:
1. Create a client with only read permission in dir1
2. mount it with the client
3. Try to write in the dir

Actual results:

it allows to write in the directory

Expected results:

it should not allow to write in the directory

Additional info:

client.name2
	key: AQD4UN1koO5cCxAABydYwjB7cAttRRkAXIyHjA==
	caps: [mds] allow *,allow r path=/dir1
	caps: [mgr] allow rw
	caps: [mon] allow *
	caps: [osd] allow rw tag cephfs data=cephfs

[root@ceph-julpark-mvqdwj-node8 mnt]# ceph-fuse -n client.name2 /mnt/julpark2/
2023-08-16T18:46:15.722-0400 7f942c712300 -1 init, newargv = 0x55ae28ab6440 newargc=15
ceph-fuse[38131]: starting ceph client
ceph-fuse[38131]: starting fuse

[root@ceph-julpark-mvqdwj-node8 julpark2]# ls
ceph-julpark-mvqdwj-node8_dd_  dir1  dir2  dir3  file_dstdir  file_srcdir  network_shared
[root@ceph-julpark-mvqdwj-node8 julpark2]# cd dir1/
[root@ceph-julpark-mvqdwj-node8 dir1]#
[root@ceph-julpark-mvqdwj-node8 dir1]# touch 234
[root@ceph-julpark-mvqdwj-node8 dir1]# ls
234  asdf  qwer