Linux NFS create mask and force user equivalent
- by Mike
I have two Linux servers:
fileserver
Debian 5.0.3 (2.6.26-2-686)
Samba version 3.4.2
apache
Ubuntu 10.04 LTS (2.6.32-23-generic)
Apache 2.2.14
I have a number of Samba shares on fileserver so that I can access files from Windows PCs. I am also exporting /data/www-data to the apache server, where I have it mounted as /var/www.
The setup is okay, except for when I come to create files on the NFS mount. I end up with files that cannot be read by Apache, or which cannot be modified by other users on my system.
With Samba, I can specify force user, force group, create mask and directory mask, and this ensures that all files are created with suitable permissions for my Apache web server. I can't find a way to do this with NFS. Is there a way to force permissions and ownership with NFS - am I missing something obvious?
Although I've spent quite a bit of time with Linux, and am weaning myself off Windows, I still haven't quite got to grip with Linux permissions... If this is not the right way to do things, I am open to alternative suggestions.