I have a directory on my Linux server:


I'am sharing this so that I can mount inside my OSX computer.


The /etc/exports file looks like this:


The problem is that I have difficulties with permissions, every time I edit things on the server side, I get a set of group and user permissions. Then when I edit a file on my OSX computer I get permission warnings in vim and when I force, I get the data saved but then this introduces a new set of groups and permissions etc.

For example, on the Linux side, I get:

drwxrwxrwx 2 someuser someshare 4096 Jun 22 21:40 test.txt

The after the edit on the Mac side, I get

-rw-rw-r-- 1 501 dialout 166 Jun 22 21:40 test.txt

I can see there is a clash, I even tried to create the same users on both sides, but no luck.


File ownership is stored numerically, not by name, as UID and GID.

The UID and GID values are translated from numbers to names via each system's /etc/passwd, /etc/group.

In your example, the file test.txt is owned by someuser's UID and GID (getent passwd someuser | awk --field-separator ':' '{print $3,":",$4}'.

On the Mac side, their equivalent of UID and GID mapping-to-names produces different results with the same UID and GID numbers as input.

You could syncronize the accounts with LDAP, but that seems overly complex.

  • I hacked (somehow) the UID and the GID on the Linux side to match the UID and the GID on the OSX side. That seems to be working. The group names are not matching, but the underlying GIDs are, so I can live with that. Thanks. – mbilyanov Jun 22 '19 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.