We have 2500+ users using linux thin clients with their home directory on a common NFS. We want Windows like file/folder sharing functionality between users.

The users are not linked to any particular machine, hence there is no IP-user mapping. So CIFS/SMB is not an option. (Given all the files reside on the same physical machine, it seems a overhead at the given scale)

I tried creating a symlink of the source user's shared directory inside the destination user's home dir (or a common directory). But, since the home directory has permission 700 in our setup, the shared directory (though it has relaxed permissions) is not accessible to the user. I don't know if this is the right approach.

Please suggest a good way of implementing this efficiently.

PS: All systems run linux/Ubuntu. The file manager is Thunar (can be changed, if needed)
PS2: I can write quite a bit of shell/python/perl script and if needed for the solution, edit the thunar app too.

As per the comment and the answer, I tried ACL. I set permissions using setfacl on NFS server and the new permissions reflect there, but the same in NOT reflected on the NFS client machines, when I check with getfacl.

NFS-Server# setfacl -Rm u:akila:rwX /nfshome/jp/shared
NFS-Server# getfacl /nfshome/jp/shared
# file: nfshome/jp/shared
# owner: jp
# group: users


NFS-Client> getfacl /nfshome/jp/shared
# file: nfshome/jp/shared/
# owner: jp
# group: users

  • did you try to use sticky bit on the directory? And you may setup file ACL for controlling user permission. – Aizuddin Zali Oct 14 '15 at 13:45
  • Thansk for the quick response. That did the work on the NFS server, but on the NFS clients, it is not reflected. – Vij Vijay Oct 16 '15 at 15:56
  • @AizuddinZali please check the EDIT section of my question. – Vij Vijay Oct 16 '15 at 16:19

As suggested already you can use ACL to setup such thing or create a sticky bit filsystem/folder (like /tmp). This is in case if you want everyone to see the data of each other but still keep separate permissions.

If you don't want to keep separate permissions and all you need to give a bulk directory/shared to all of your users then there is nothing simple like that. you can just create a local account owner of the shared directory (home for local user) and allow all users to sudo into that account. Sudoers is your best friend in this case, nothing could be easier.

  • Thanks @ostendali. The sharing I want to do in in-place and private (one-to-one or one-to-many, but not open to all). Though ACL seems to be a perfect solution, I'm not able to get it to work on NFS. Please check the EDIT section I've added to the question for details. – Vij Vijay Oct 16 '15 at 16:21
  • The real answer is nfs4_setfacl and nfs4_getfacl. Though I'm not clear on how to use the sticky bit. – Vij Vijay Oct 18 '15 at 17:42

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.