2

I NFS export a folder from MacOS 10.12 and mount it on Centos 6.

The UID and GID between the machines is the same, but from the Linux box I cannot delete files unless the directory has "write everyone" permissions set.

Why not?

The files can be deleted after changing permissions of the enclosing folder to 777

On Mac Side

mac$ ls -lnd
drwxrwxr-x  143 501  501  4862 28 Mar 09:21 ./

mac$ ls -ln *debug*
lrwxrwxrwx  1 501  501    15 22 Mar 16:45 libdvdebug.so@ -> libdvdebug.so.6
lrwxrwxrwx  1 501  501    20 22 Mar 16:45 libdvdebug.so.6@ -> libdvdebug.so.6.0-34
-rwxrwxr-x  1 501  501  7042 22 Mar 16:45 libdvdebug.so.6.0-34*

mac$ id
uid=501(danny) gid=501(djw) groups=501(djw),104(com.apple.access_ssh-disabled),701(com.apple.sharepoint.group.1),502(access_bpf),12(everyone),
20(staff),61(localaccounts),66(_uucp),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),506(finance),33(_appstore),100(_lpoperator),204(_developer),
395(com.apple.access_ftp),398(com.apple.access_screensharing)

$ grep 168.2 /etc/exports
/Work/Software_Devel -alldirs -maproot=danny  -network 192.168.2.0   -mask 255.255.255.0

On Linux Side

linux$ ls -ln *debug*
lrwxrwxrwx 1 501 501   15 Mar 22 16:45 libdvdebug.so -> libdvdebug.so.6
lrwxrwxrwx 1 501 501   20 Mar 22 16:45 libdvdebug.so.6 -> libdvdebug.so.6.0-34
-rwxrwxr-x 1 501 501 7042 Mar 22 16:45 libdvdebug.so.6.0-34

linux$ id
uid=501(tqdevel) gid=501(tqdevel) groups=501(tqdevel)

linux$ ls -ldn .
drwxrwxr-x 143 501 501 4862 Mar 28 09:21 .

linux$ mount
192.168.2.10:/Work/Software_Devel on /mnt/swdevel type nfs 
(rw,rsize=8192,wsize=8192,timeo=14,intr,addr=192.168.2.10)

# showmount -e 192.168.2.10
Export list for 192.168.2.10:
/Work/Video Project  192.168.245.0
/Work/Software_Devel 10.0.0.0,10.128.112.0,10.128.113.0,172.16.16.0,192.168.135.224,
192.168.15.0,192.168.2.0,192.168.245.0,192.168.87.0,192.168.9.0
  • Please add the output of the exportsfile on the mac and the output of showmount -e 192.168.2.10 on the linux machine to your question. – ridgy Mar 28 '17 at 10:03
  • updated as requested – Danny Mar 28 '17 at 14:44
  • Acl's work differently on Macs and Linux's. The directory may have some mac-acls set that allow child Deletion even when it isn't world-writtable. Try removing acls set on that directory. – John Militer Mar 28 '17 at 22:23
  • You could remove them if they are present via chmod -a "everyone allow delete_child" directory Replacing directory with the path to the directory. – John Militer Mar 29 '17 at 2:05
1

It isn't indicated but try to reset the ACL permissions.

  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – Jeff Schaller Mar 28 '17 at 15:15
  • @JeffSchaller This is an answer and it may well be correct. OSX does have a delete ACL. – Gilles Mar 28 '17 at 21:18
  • Are there specific steps to "try to reset the ACL permissions"? – Jeff Schaller Mar 28 '17 at 22:14
  • @Gilles: I agree with you that this is an answer, and I agree with Jeff that is probably wrong.  Does mac OS’s ls -l show an eleventh mode character (after drwxrwxr-x) when an ACL is present? – Scott Mar 29 '17 at 2:37
  • There are no ACLs. ie, ls -le or ls -l@ shows nothing. – Danny Mar 29 '17 at 5:08
0

Try

$ ls -l
$ whoami
$ groups

Then check if the files belong to you or your group.

Enjoy.

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.