I can do a cat xyz > xyz in my contrib folder which creates a file named 'xyz' but I get a permission denied when I try to copy some files over. cp: cannot create regular file `./p9authsrv/auth/lib/getauthkey.c': Permission denied I am able to get over the above issue by doing a cat of that file and do a ">". Obviously it would work only if I have a handful of files.
This is due to a couple of factors: a) append mode and exclusive mode mean something different for Linux than for Plan 9, but we still attempt to translate the mode bits even when in legacy mount mode (when mounting a plan 9 server) b) the append bits are wrong and rejected by plan 9 severs. This patch should fix it: --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -124,7 +124,7 @@ static int p9mode2unixmode(struct v9fs_session_info *v9ses, return res; } -int v9fs_uflags2omode(int uflags) +int v9fs_uflags2omode(struct v9fs_session_info *v9ses, int uflags) { int ret; @@ -144,14 +144,17 @@ int v9fs_uflags2omode(int uflags) break; } - if (uflags & O_EXCL) - ret |= P9_OEXCL; - if (uflags & O_TRUNC) ret |= P9_OTRUNC; - if (uflags & O_APPEND) - ret |= P9_OAPPEND; + /* these mean something different on Plan 9 than Linux */ + if (v9fs_extended(v9ses)) { + if (uflags & O_EXCL) + ret |= P9_OEXCL; + + if (uflags & O_APPEND) + ret |= P9_OAPPEND; + } It will be submitted against 2.6.26-rc series.
*** This bug has been marked as a duplicate of bug 10689 ***