Getting errors trying to mount an NFS server.

I am getting the following error when trying to mount an NFS share:

wikijs % sudo mount -t nfs -o nfsvers=3 vista.local:/home/w1jp/wrk/wikijs vista_wikijs
Password:
mount_nfs: can't mount /home/w1jp/wrk/wikijs from vista.local onto /Users/jon/wrk/wikijs/vista_wikijs: Operation not permitted
mount: /Users/jon/wrk/wikijs/vista_wikijs failed with 1


This command works fine running on raspbian bullseye.


The server sharing the folder is on ubuntu 24.04 LTS.  The mount point has 0777 mode as does the shared directory.


I am running macos: 15.1 on MBP (Intel i9).


MacBook Pro 15″, macOS 15.1

Posted on Nov 13, 2024 3:46 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 13, 2024 4:14 PM

As Apple has increased security over the years, some of these older protocols and usages haven't kept up. NFS in particular was always designed to be done completely as root. Your mount point would have to be a root-owned directory.


Modern macOS has a much different permissions model than traditional Unix. The local user actually has higher permissions than root in some cases.


So you can try it either without sudo, or by specifying a root-owned mount point outside of a user home directory. You'll probably also have to specify the password some other way. I doubt it will accept the password via command-line entry. That, too, has been upgraded.

4 replies
Question marked as Top-ranking reply

Nov 13, 2024 4:14 PM in response to w1jp

As Apple has increased security over the years, some of these older protocols and usages haven't kept up. NFS in particular was always designed to be done completely as root. Your mount point would have to be a root-owned directory.


Modern macOS has a much different permissions model than traditional Unix. The local user actually has higher permissions than root in some cases.


So you can try it either without sudo, or by specifying a root-owned mount point outside of a user home directory. You'll probably also have to specify the password some other way. I doubt it will accept the password via command-line entry. That, too, has been upgraded.

Nov 13, 2024 4:36 PM in response to etresoft

It does not appear to work with || without sudo. NFS has always been preferred by me rather than SMB just because it honors the *NIX permissions structure and allows non-root user use.


What is the preferred 'modern' way for me to share a ubuntu linux directory to my macos user? I would like to share my development directories to enable me to develop on my mbp with three screens and not have to move files around manually.


Tnx,

Jon




Nov 13, 2024 4:45 PM in response to w1jp

w1jp wrote:

It does not appear to work with || without sudo. NFS has always been preferred by me rather than SMB just because it honors the *NIX permissions structure and allows non-root user use.

Even Unix doesn't use Unix permissions anymore. ACLs are common. And macOS has yet another layer of permissions on top of that.


NFS was always designed exclusively for root. It sounds like SMB is what you want to use.


What is the preferred 'modern' way for me to share a ubuntu linux directory to my macos user? I would like to share my development directories to enable me to develop on my mbp with three screens and not have to move files around manually.

I wouldn't recommend that anyone use traditional file servers anymore. For one thing, it makes you vulnerable to ransomware. I realize that's probably not a concern for you, but most users of file servers are companies that are at risk. But regardless, Mac support for file servers has been poor for a long time. That's the irony of using a file server with a Mac. The Mac isn't the vulnerability. Anyone could log in to the server via Unix or Windows and wipe/encrypt the whole thing. But they couldn't do that with a Mac simply because the Mac can process that much data on a file server. 😄


For a developer, you really should be using version control. While git is an atrocious abomination, it did win the version control wars, so that's what we use now.

Nov 14, 2024 10:08 AM in response to etresoft

Even Unix doesn't use Unix permissions anymore. ACLs are common.

NFSv4 supports ACLs...


For a developer, you really should be using version control. While git is an atrocious abomination, it did win the version control wars, so that's what we use now.

LOL-- agree!


However, I have never gotten too attached to those things as I can't tell you how many version control systems I have used in the past 30 years (started with SCCS)! Just wait-- the next version control environment will need to track tokens not code. Code will go the way of VLSI CAD— synthesis (via LLM tokens vs HLS for Verilog).


I am using git (private gitlab); however, I am too lazy to do the `git fetch`. ;-) Plus in active development, the history, and pruning history in git more. And I am definitely too lazy to spend time squashing commits. With Docker we bring in our local filesystem into the container so it is really easy that way. It just when my docker container is in my private cloud. I am just really tired of the commit/fetch cycle to make simple changes to my code. [yes I am aware I could create Actions to do this-- again, I am too lazy for my personal work]


This is more a curiosity thing to me as it seems the only "modern" :-^ way to file share now requires a cloud connection (e.g., rclone).


[Edited by Moderator]

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Getting errors trying to mount an NFS server.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.