Yes, accessing the files through runat works. I think /proc (and /dev/fd, which has the same trouble but only works if the same process accesses the fds, for obvious reasons since /dev/fd is per process and can not be shared between processes unlike /proc/$pid/fd/) gets confused because the directories have no name. pfiles gets confused in a similar way and some times crashes, but without a predictable pattern or test case.
As interestingly side note, doing a cd to the /proc/$$/fd/$fd first works: -------- cut here -------- touch x4 ; cd -@ x4 ; redirect {n}<"." ; cd .. ; (cd "/proc/$$/fd/$n" ; print "hello1" >"myxattr") ; (cd -@ x4 ; cat "myxattr" ) ; rm x4 -------- stop cutting here -------- Accessing the file with the full path directly does not work: -------- cut here -------- touch x1 ; cd -@ x1 ; redirect {n}<"." ; cd .. ; print "hello1" >"/proc/$$/fd/$n/myxattr1" ; (cd -@ x1 ; cat "myxattr1" ) ; rm x1 -------- stop cutting here -------- Olga On Fri, Jul 13, 2012 at 9:17 PM, Gordon Ross <gordon.w.r...@gmail.com> wrote: > On Fri, Jul 13, 2012 at 2:16 AM, ольга крыжановская > <olga.kryzhanov...@gmail.com> wrote: >> Can some one here explain why accessing a NFSv4/ZFS xattr directory >> through proc is forbidden? >> > [...] >> truss says the syscall fails with >> open("/proc/3988/fd/10/myxattr", O_WRONLY|O_CREAT|O_TRUNC, 0666) Err#13 >> EACCES >> >> Accessing files or directories through /proc/$$/fd/ from a shell >> otherwise works, only the xattr directories cause trouble. Native C >> code has the same problem. >> >> Olga > > Does "runat" let you see those xattr files? > > -- > Gordon Ross <g...@nexenta.com> > Nexenta Systems, Inc. www.nexenta.com > Enterprise class storage for everyone -- , _ _ , { \/`o;====- Olga Kryzhanovska -====;o`\/ } .----'-/`-/ olga.kryzhanov...@gmail.com \-`\-'----. `'-..-| / http://twitter.com/fleyta \ |-..-'` /\/\ Solaris/BSD//C/C++ programmer /\/\ `--` `--` _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss