linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frank Filz" <ffilzlnx@mindspring.com>
To: <zhu.shangzhong@zte.com.cn>, <devel@lists.nfs-ganesha.org>,
	<linux-nfs@vger.kernel.org>
Subject: RE: [NFS-Ganesha-Devel] [NFS-Ganesha-Devel]ceph_fsal_setattr2 returned Operation not permitted
Date: Tue, 18 Sep 2018 10:07:43 -0700	[thread overview]
Message-ID: <013901d44f72$1df02350$59d069f0$@mindspring.com> (raw)
In-Reply-To: <201809171939042772224@zte.com.cn>

Ah, when FSAL_CEPH was written, Ceph didn't have CEPH_SETATTR_ATIME_NOW =
and CEPH_SETATTR_MTIME_NOW. Now that they are available, we should use =
them. We may need to conditional compile.

Frank

> -----Original Message-----
> From: zhu.shangzhong@zte.com.cn [mailto:zhu.shangzhong@zte.com.cn]
> Sent: Monday, September 17, 2018 4:39 AM
> To: devel@lists.nfs-ganesha.org; linux-nfs@vger.kernel.org
> Subject: [NFS-Ganesha-Devel] [NFS-Ganesha-Devel]ceph_fsal_setattr2 =
returned
> Operation not permitted
>=20
> How to reproduce:
> 1. mount the nfs-ganesha export directory with NFSV3 2. create new =
users:
> user1 and user2, there is the same user group for user1 and user2
>     uid=3D9998(user1) gid=3D100(users) groups=3D100(users)
>     uid=3D9997(user2) gid=3D100(users) groups=3D100(users) 3. log in =
using user1 and
> create new file named abc.txt 4. chmod 664 abc.txt 5. log in using =
user2, and
> write new content to abc.txt
>     echo 'Hello' > abc.txt
> 6. The error "Operation not permitted" will be output
>=20
> Expected result:
> user2 may write data to file abc.txt successfully.
>=20
> The more detailed info could be found in =
http://tracker.ceph.com/issues/35961
> The issue may be fixed by changing the following code, is it =
appropriate changes
> for fixing the issue?
>=20
> src\FSAL\FSAL_CEPH\handle.c
> fsal_status_t ceph_setattr2(struct fsal_obj_handle *obj_hdl, bool =
bypass, struct
> state_t *state, struct attrlist *attrib_set) { ...
> 	if (FSAL_TEST_MASK(attrib_set->valid_mask, ATTR_ATIME_SERVER)) {
> 		struct timespec timestamp;
> mask |=3D CEPH_SETATTR_ATIME;  //
> s/CEPH_SETATTR_ATIME/CEPH_SETATTR_ATIME_NOW
> ...
> if (FSAL_TEST_MASK(attrib_set->valid_mask, ATTR_MTIME_SERVER)) {
> 		struct timespec timestamp;
> mask |=3D CEPH_SETATTR_MTIME; //
> s/CEPH_SETATTR_MTIME/CEPH_SETATTR_MTIME_NOW
> ...
> }

       reply	other threads:[~2018-09-18 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201809171939042772224@zte.com.cn>
2018-09-18 17:07 ` Frank Filz [this message]
2018-09-18 17:53 ` [NFS-Ganesha-Devel] [NFS-Ganesha-Devel]ceph_fsal_setattr2 returned Operation not permitted Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='013901d44f72$1df02350$59d069f0$@mindspring.com' \
    --to=ffilzlnx@mindspring.com \
    --cc=devel@lists.nfs-ganesha.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=zhu.shangzhong@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).