[issue1701] mkdir / returns EPERM instead of EEXIST (related to pkg_add)

Chris Turner c.turner at 199technologies.org
Mon Apr 19 16:57:11 PDT 2010


Alex Hornung (via DragonFly issue tracker) wrote:
please change EPERM to EACCES before committing this. EPERM is only acceptable 
for S_ISVTX, not for: "[EACCES]
Search permission is denied on a component of the path prefix, or write 
permission is denied on the parent directory of the directory to be removed." 
which is the case here.
Okay - so I finally got ready to do this (after some git wrangling) - 
and read back through this email - Why are you saying that this needs to 
be EACCES?

Unless I am misreading the file, this particular branch of execution 
only affects '/' - and more specifically, the case of trying to 
'mkdir(/) or rmdir(/)' - there is a section later (commented 'POSIX 
junk') that deals with other cases..

And you're saying (or I suppose POSIX is saying, and you're quoting)

"Search permission is denied on a component of the path prefix, or write 
   permission is denied on the parent directory of the directory to be 
removed."

But there is no parent or prefix of '/' - so I don't see how that is the 
case here as you suggest. This case is basically saying 'root already 
exists and cannot be removed', where it was before saying 'you cannot or 
create or remove root'.

Rather philosophical, really.. maybe I will change the comment.

Anyhow.

please advise / clarify / etc.

Thanks

- Chris





More information about the Bugs mailing list