0

Case: Debian 7.1.0 server running nginx 1.2.1, hosting OwnCloud 5.0.13 OwnCloud default installed in /var/www/owncloud Files uploaded to owncloud reside in /var/www/owncloud/data However, diskspace is running low.

Idea is to move data to a file server which has more space, but I have a permissions problem.

File server in question is based on OmniOS (illumos derivate) managed by napp-it, ZFS filesystem with NFS exports. NFS exports from OmniOS server are mountable and writeable, however I am not sure how to proceed as owncloud requires (afaik): ../owncloud/data to be 0770 and owned by www-data:www-data

I did try to move the /var/www/owncloud/data to data.old, symlink the nfs mount to ./data inside owncloud, owncloud refused to work, stating folder should be 0770 rights. nginx instance is using www-data user and group.

On debian systems, UID/GID of www-data is 33, but this is reserved in OmniOS (atleast on my system I am not sure how to create www-data with uid 33 and group www-data with gid 33)

What would be a reasonable approach to have the debian server mount an nfs share from omnios with 0770 rights and www-data as owner as I am not sure if changing /etc/passwd uid and /etc/group gid of www-data is best practise to match on both systems (or would solve my permissions-problems)?

user185212
  • 33
  • 1
  • 8
  • The NFS mount daemon and the `idmapd` should be able to match the group by name. I checked my installation and found `RPCMOUNTDOPTS=--manage-gids` in `/etc/default/nfs-kernel-server` and `NEED_IDMAPD=yes` in `/etc/default/nfs-common`. Maybe that's a place to start? – Marcus Rickert Nov 17 '13 at 00:32
  • Thank you for your help, unfortunately adding NEED_IDMAPD=yes did not solve my issues. As OmniOS is a solaris-type system, /etc/default/nfs-kernel-server is nonexistent. I will keep looking into it, I found references on idmap, but that was more for windows <-> unix id relationships concerning omnios/illumos/solaris. – user185212 Nov 17 '13 at 01:40
  • The solution that worked for me with clues from Marcus Rickert: Debian Squeeze and Wheezy ------------------------------------------- in /etc/idmapd.conf - added Domain = mydomain-name in /etc/default/nfs-common - added NEED_IDMAPD=yes (previously had =YES, doesn't "work") Omnios ------------------------------------------- in /etc/default/nfs settings are deprecated and need sharectl management i added sharectl set -p nfsmapid_domain=mydomain-name nfs verified by sharectl get nfs – user185212 Dec 12 '13 at 10:24

1 Answers1

0

Debian Squeeze and Wheezy

in /etc/idmapd.conf - added Domain = mydomain-name in /etc/default/nfs-common - added NEED_IDMAPD=yes (previously had =YES, doesn't "work")

Omnios

in /etc/default/nfs settings are deprecated and need sharectl management i added sharectl set -p nfsmapid_domain=mydomain-name nfs verified by sharectl get nfs

user185212
  • 33
  • 1
  • 8