I meant to send this to the list but sent it to mark by mistake, sorry!
Been lurking for a while so I guess this is hello!
Is there a better way for me to be connecting to the Linux-based server so that I can access the same files that the Windows users are using through a mounted share?
Yes, the way we do it at work is like this
[sharename] force group sambafiles force user sambafiles path = /where/it/is create mask = 0660 directory mask = 0770 writable = yes write list = @users
You need to create a user and group called sambafiles that must not be used for anything else, you can control read and write to this share by using groups, all the files will be owned sambafiles:sambafiles which means all users in the allowed groups can read and write.
maz
On 08/03/10 19:49, Maz Walker wrote:
I meant to send this to the list but sent it to mark by mistake, sorry!Yes, the way we do it at work is like this
[sharename] force group sambafiles force user sambafiles path = /where/it/is create mask = 0660 directory mask = 0770 writable = yes write list = @users
So the differences from my existing config are: - I have create/directory mask at 0664/0775, so I'm setting read only status for non-users - I have valid users set to @users, you force the user to sambafiles and then limit writes to @users
I'm not in the office at the moment but I'll try this when I am. However, one thing it would be nice to keep is for the person who created a file to be shown against it as it's user, which I have at the moment. Sure, I have that but everything else is broken :-) But if there's a way to retain that I'd like to.
OK, I finally got to the bottom of this.
All I changed was to add: force create mode = 664 force directory mode = 775
When Windows creates a file, it would appear that it creates it with user and group write permissions, which (assuming create/directory mask are set to allow it) causes the file to be created with group write permission correctly.
Linux, on the other hand, seems to create a file with user read/write but group read only, which is again passed through to the server's file system, making the file unwritable to other users of the same group.
Using the above forces Samba to add write permissions regardless of what the client requests, problem solved!