9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.63k stars 319 forks source link

Mounted volume from Mac read-only? #456

Open mackbw opened 3 years ago

mackbw commented 3 years ago

I am perfectly willing to accept that this may be due to my own stupidity, (and that it is even likely). However, I am having issues mounting my Plan 9 server to copy files to it and hoping that someone can help we with it (or help getting my head out of my ass). The server is a new copy of 9 front set up for both auth and file serving. The -N flag has been removed from the authsrv to allow for p9sk1 authentication. I can mount and freely use the file systems from VMs of both 9front and Lab’s Plan 9. For Plan9Port I am using MacOs 10.15.6 with OSXFuse 3.11.2.

I have mounted the 9front server with the following:

factotum -n srv -a -l user=mbwallace sysname which prompts me for my password. 9 mount sysname /Volumes/sysname

and this mounts the volume and I can browse it from the terminal or in Finder. However, if I try to copy something from the terminal I get cp: ./filename: Permission denied

In looking at the volume through finder - i see locks on all the folders, except on usr. So I try copying to that folder in the terminal with the same response. Only then, all the locks on the folders disappear, except on the folders in the usr directory. I try unlocking my home directory using “Get Info” from the context menu and then dragging a file there. Now MacOS asks me for my password (or touch id) to copy the file, and after I provide my password, I get “The item ‘filename’ can’t be copied because there isn’t enough free space.” And, as I look at the bottom status bar, it shows the number of items with zero bytes remaining.

If I do a “Get Info” on the volume, it shows as a OSXFUSE volume with the following attributes: Format: Generic File System (OSXFUSE) Capacity: Zero bytes Available: Zero bytes Used: Zero bytes (Zero bytes on disk)

However, if I do browse the volumes contents, I do see file sizes. I can open up ‘text’ files like html or .css. However, if i try to open a PDF or a gif, or jpg, the application opening says it can not open the file because it’s a different format or the file is damaged. (so maybe I don’t want OSXfuse writing to that volume now?)

I have also tried to mount the 9fs volume with a direct mount call using:

mount -t 9p -o unix,trans=unix,uname=mbwallace sysname /Volumes/sysname

but this fails. First by saying it does not understand the options - which i removed one at a time until i was left with only mount -t 9p sysname /Volumes/sysname to which I get - mount_9p [-r] fs_tag

If I look at the man page for mount_9p, is says there is a ‘-o’ option - but nothing of -r or fs_tag. I did a which of mount_9p, and it shows it is at /sbin/mount_9p. The man page is from the BSD System Manager’s Manual. I know not part of Plan9Port, but was trying other ways of mounting the 9fs volume.

Of course the other issue would be whether it is a Plan9Port issue, or a MacOSX Fuse issue?

I am hoping that there is something stupid like an extra option that I have not added to the command line.

Hope I’ve provided enough information.

Thanks,

Mack

karisawa commented 2 years ago

The problem comes from the code in $PLAN9/src/cmd/9pfuse/main.c BEGIN /*

macOS is cleaver enough to detect this cheating.

If some value is given, your problem might be resolved.