* [9fans] copying over 9P using plan9port
@ 2011-10-04 17:08 Jens Staal
2011-10-04 18:09 ` David du Colombier
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Jens Staal @ 2011-10-04 17:08 UTC (permalink / raw)
To: 9fans
Hi.
First of all sorry if I through my ignorance am attempting something
completely stupid.
I have been trying to copy the APE sources using plan9port. The
purpose of this is that I am trying to make an APE augmentation
PKGBUILD to the kencc package [1] (and ultimately, I will try to
figure out how to make a kencc+APE cross compiler for Plan9 on a Linux
host) for Arch linux.
I have also asked at the Arch forums [2] but no answers yet, so I
guess it is nothing anyone has attempted...
I can mount the sources at bell labs using the following procedure
mkdir sources
9 mount 'tcp!sources.cs.bell-labs.com' sources
I can then cd and explore the bell labs sources via plan9port, so that
works just fine.
When I then try something like
cp -ar sources/plan9/sys/src/ape ape
I get an error stating:
unexpected open flags 0500000cp: can not open
”sources/plan9/sys/src/ape/9src/mkfile” for reading: Access denied
What I now wonder is: Is this the expected behaviour? Is anonymous
copying from the Bell labs sources blocked? Or is the permission
issues local and something I can fix by a mount option? I could not
find anything using 9 man mount...
[1] https://aur.archlinux.org/packages.php?ID=49835
[2] https://bbs.archlinux.org/viewtopic.php?id=127522
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 17:08 [9fans] copying over 9P using plan9port Jens Staal
@ 2011-10-04 18:09 ` David du Colombier
2011-10-04 19:07 ` Jens Staal
2011-10-04 19:16 ` Russ Cox
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: David du Colombier @ 2011-10-04 18:09 UTC (permalink / raw)
To: 9fans
> What I now wonder is: Is this the expected behaviour?
No. You are doing it fine.
It's working for me right now, authenticated and unauthenticated.
I don't know why it doesn't work for you.
Beware "9 mount" should be spelled "9mount" in your messages.
What kernel version are you using?
--
David du Colombier
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 18:09 ` David du Colombier
@ 2011-10-04 19:07 ` Jens Staal
0 siblings, 0 replies; 9+ messages in thread
From: Jens Staal @ 2011-10-04 19:07 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
2011/10/4 David du Colombier <0intro@gmail.com>:
>> What I now wonder is: Is this the expected behaviour?
>
> No. You are doing it fine.
> It's working for me right now, authenticated and unauthenticated.
>
> I don't know why it doesn't work for you.
> Beware "9 mount" should be spelled "9mount" in your messages.
>
> What kernel version are you using?
>
> --
> David du Colombier
>
>
uname -r:
3.0-ARCH
Since you ask about kernel version, I guessed that it meant that it
might be a permission issue on my side. I also tried doing the same
mount and copy as root.
This also failed, so I am confused.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 17:08 [9fans] copying over 9P using plan9port Jens Staal
2011-10-04 18:09 ` David du Colombier
@ 2011-10-04 19:16 ` Russ Cox
2011-10-04 19:46 ` Jens Staal
2011-10-04 19:39 ` Brian L. Stuart
2011-10-05 15:08 ` Nicolas Bercher
3 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2011-10-04 19:16 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
What does 'mount' (not 9 mount, just mount)
say after you mount the file system?
That will tell you whether the '9 mount' used
v9fs (Linux 9P driver) or 9pfuse (user-space
9P-to-FUSE translator).
Neither gets much use, so it is easy to believe
that there is a bug.
Russ
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 17:08 [9fans] copying over 9P using plan9port Jens Staal
2011-10-04 18:09 ` David du Colombier
2011-10-04 19:16 ` Russ Cox
@ 2011-10-04 19:39 ` Brian L. Stuart
2011-10-04 19:44 ` Russ Cox
2011-10-05 15:08 ` Nicolas Bercher
3 siblings, 1 reply; 9+ messages in thread
From: Brian L. Stuart @ 2011-10-04 19:39 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> I can then cd and explore the bell labs sources via
> plan9port, so that
> works just fine.
>
> When I then try something like
>
> cp -ar sources/plan9/sys/src/ape ape
>
> I get an error stating:
> unexpected open flags 0500000cp: can not open
> ”sources/plan9/sys/src/ape/9src/mkfile” for reading:
> Access denied
Give it a shot without the -a. I've had a lot of issues
with the strange attribute flags in "modern" Unices. The
issues have usually been when writing via 9p, but it's
worth a try to see if that has anything to do with it.
Any idea what the 0500000 flags indicate on your system?
BLS
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 19:39 ` Brian L. Stuart
@ 2011-10-04 19:44 ` Russ Cox
2011-10-04 19:51 ` Jens Staal
0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2011-10-04 19:44 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
To answer my question: the error message comes from 9pfuse.
The extra bits are O_NOFOLLOW and O_LARGEFILE, both of
which seem harmless in this context. Try this:
diff -r 6db8fc2588f6 src/cmd/9pfuse/main.c
--- a/src/cmd/9pfuse/main.c Mon Oct 03 18:16:09 2011 -0400
+++ b/src/cmd/9pfuse/main.c Tue Oct 04 15:43:16 2011 -0400
@@ -577,6 +577,13 @@
openmode = flags&3;
flags &= ~3;
flags &= ~(O_DIRECTORY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC);
+#ifdef O_NOFOLLOW
+ flags &= ~O_NOFOLLOW
+#endif
+#ifdef O_LARGEFILE
+ flags &= ~O_LARGEFILE
+#endif
+
/*
* Discarding O_APPEND here is not completely wrong,
* because the host kernel will rewrite the offsets
@@ -594,7 +601,7 @@
* O_NONBLOCK -> ONONBLOCK
*/
if(flags){
- fprint(2, "unexpected open flags %#uo", (uint)in->flags);
+ fprint(2, "unexpected open flags %#uo\n", (uint)in->flags);
replyfuseerrno(m, EACCES);
return;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 19:16 ` Russ Cox
@ 2011-10-04 19:46 ` Jens Staal
0 siblings, 0 replies; 9+ messages in thread
From: Jens Staal @ 2011-10-04 19:46 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
2011/10/4 Russ Cox <rsc@swtch.com>:
> What does 'mount' (not 9 mount, just mount)
> say after you mount the file system?
>
> That will tell you whether the '9 mount' used
> v9fs (Linux 9P driver) or 9pfuse (user-space
> 9P-to-FUSE translator).
>
> Neither gets much use, so it is easy to believe
> that there is a bug.
>
> Russ
>
>
The p9p 9mount uses 9pfuse on my system
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 19:44 ` Russ Cox
@ 2011-10-04 19:51 ` Jens Staal
0 siblings, 0 replies; 9+ messages in thread
From: Jens Staal @ 2011-10-04 19:51 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
2011/10/4 Russ Cox <rsc@swtch.com>:
> To answer my question: the error message comes from 9pfuse.
> The extra bits are O_NOFOLLOW and O_LARGEFILE, both of
> which seem harmless in this context. Try this:
>
>
> diff -r 6db8fc2588f6 src/cmd/9pfuse/main.c
> --- a/src/cmd/9pfuse/main.c Mon Oct 03 18:16:09 2011 -0400
> +++ b/src/cmd/9pfuse/main.c Tue Oct 04 15:43:16 2011 -0400
> @@ -577,6 +577,13 @@
> openmode = flags&3;
> flags &= ~3;
> flags &= ~(O_DIRECTORY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC);
> +#ifdef O_NOFOLLOW
> + flags &= ~O_NOFOLLOW
> +#endif
> +#ifdef O_LARGEFILE
> + flags &= ~O_LARGEFILE
> +#endif
> +
> /*
> * Discarding O_APPEND here is not completely wrong,
> * because the host kernel will rewrite the offsets
> @@ -594,7 +601,7 @@
> * O_NONBLOCK -> ONONBLOCK
> */
> if(flags){
> - fprint(2, "unexpected open flags %#uo", (uint)in->flags);
> + fprint(2, "unexpected open flags %#uo\n", (uint)in->flags);
> replyfuseerrno(m, EACCES);
> return;
> }
>
>
Thanks I will try the patch as soon as I got time.
@ brian:
doing "cp -r" instead of "cp -ar" did not make a difference
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] copying over 9P using plan9port
2011-10-04 17:08 [9fans] copying over 9P using plan9port Jens Staal
` (2 preceding siblings ...)
2011-10-04 19:39 ` Brian L. Stuart
@ 2011-10-05 15:08 ` Nicolas Bercher
3 siblings, 0 replies; 9+ messages in thread
From: Nicolas Bercher @ 2011-10-05 15:08 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On 04/10/2011 19:08, Jens Staal wrote:
> When I then try something like
>
> cp -ar sources/plan9/sys/src/ape ape
>
> I get an error stating:
> unexpected open flags 0500000cp: can not open
> ”sources/plan9/sys/src/ape/9src/mkfile” for reading: Access denied
>
Hi,
This is working for me without plan9port (Debian GNU/Linux):
$ mkdir -p /n/sources
$ mount -t 9p -o proto=tcp 204.178.31.11 /n/sources
$ cp -ar /n/sources/plan9/sys/src/ape /tmp/ape
Nicolas
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-10-05 15:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-04 17:08 [9fans] copying over 9P using plan9port Jens Staal
2011-10-04 18:09 ` David du Colombier
2011-10-04 19:07 ` Jens Staal
2011-10-04 19:16 ` Russ Cox
2011-10-04 19:46 ` Jens Staal
2011-10-04 19:39 ` Brian L. Stuart
2011-10-04 19:44 ` Russ Cox
2011-10-04 19:51 ` Jens Staal
2011-10-05 15:08 ` Nicolas Bercher
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).