Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question
    
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 0: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 1: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 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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