1

I have a NFS + SMB share on my Win server called 'media' (same path).
Both shares are read-only for guests - the Win server add files and both protcols can read them.

Now things getting more complex

I want to use my CentOS(6.5) server to add files to the NFS share and access them via NFS and SMB from Win clients. But here comes the problem that files added via NFS are not visible via SMB because they don't inherit permissions from the share.

I tried the whole day a bunch of different things, I always get weird problems.

My question

Is there a well working solution or should I do not mix win/nix shares together?

UPDATE #1

The -nolock parameter within mount seems to help. But this question isn't answered.

UPDATE #2

@skohrs
After your update

The visibility from my windows client

create file in unix machine:            SMB hidden  NFS visible  
create file in SMB from win client:     SMB visible NFS visible  
create file in NFS from win client:     SMB hidden  NFS visible  
create file in 'media' from win server: SMB hidden  NFS visible    

Solution

The way I mounted my NFS share in CentOS

mount -nolock 192.168.178.5:/MEDIA media
1

It sounds like you need to enable setgid on the 'media' directory. When setgid permission is applied to a directory, files that were created in this directory belong to the group to which the directory belongs, not the group to which the creating process belongs. Any user who has write and execute permissions in the directory can create a file there. However, the file belongs to the group that owns the directory, not to the user's group ownership.

Here's a general example, which hopefully makes sense to your implementation:

chmod g+s /mnt/media
  • update: pls read my UPDATE2 in my inital post. – Lucas Dec 11 '13 at 14:04
  • My apologies, I misread the question and assumed the CentOS host was the file server. At this point, it sounds more like Windows permissions. – skohrs Dec 11 '13 at 14:49

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.