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.

I am trying to figure out the best way to set up an NFS server so that my Apache servers which have a shared images mount can create images there.

Here is the current configuration on the nfs server exports (just the export options)

(sync,no_subtree_check,all_squash,rw) 

As a result, all of the files are created as and owned by the user nfsnobody.

I had to chmod 777 the entire directory to make apache be able to write to this directory, something I was not fond of, but that's my temporary workaround, which I am hoping you can help me with.

The other issue is that there is no apache user on the nfs server, so when apache tries to create files, it shows the uid as 57843 for example instead of the username.

Which brings me to the client side configuration:

Nfs mounts on the client are mounted as:

/someexport /somemount  nfs defaults,acl    0 0

There are a lot of problems with this configuration including the 777 permissions, and the uid mismatch.

What is a better configuration for this situation I might use?

Also, should apache be a member of the nfsnobody group?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

If you control the NFS server add an apache user with the same UID/GID. Then the files can be owned by the appropriate user.

share|improve this answer
add comment

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.