Re: [fuse-devel] [PATCH] vfs: fix propagation of atomic_open create error on negative dentry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Miklos Szeredi wrote:
Sage Weil<sage@xxxxxxxxxxx>  writes:


Hi Miklos,

I found some time to track down the O_CREAT error code issue.  Patch is
below.  Does this look correct?

I was reproducing with

  ceph-fuse mnt
  mkdir -p mnt/a
  cd mnt
  .../pjd-fstest-20080816/fstest -u 65534 -g 65534 open a/foo O_RDONLY,O_CREAT 0644

EACCES is expected, ENOENT was returned instead.

I don't quite undersdand what is happending here.

Why does ceph-fuse return ENOENT here?  Returning ENOENT for O_CREAT
only makes sense if the parent directory doesn't exist, but that's not
the case here.


In this test, the parent directory exists, but it is not
writable by the process which tries to create the file.

According to opengroup, from
http://pubs.opengroup.org/onlinepubs/000095399/functions/open.html


   The /open/() function shall fail if:

   [EACCES]
       Search permission is denied on a component of the path prefix,
       or the file exists and the permissions specified by /oflag/ are
       denied, or *the file does not exist and write permission is
       denied for the parent directory of the file to be created*, or
       O_TRUNC is specified and write permission is denied.


Regards

Jean-Pierre

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux