Got another query. If I want to add e.g. read only abilities to a user on Samba how do I do I do it? I know I can add the user easily to the .conf file.
The purpose is so that other users are allowed to browse the server and copy but not allowed to move and edit anything.
Code:
[somepath]
path = /path/to/dir
valid users = user1 user2 ...[I]or[/I]...
force group = @groupname ...[I]i may have this syntax wrong[/I]...
read only = no
...[I]other options[/I]...
Now, set ownership of /path/to/dir as user1:groupname, and permission as say 750 or 640. Then, have "groupname" as one of the groups which user2 belongs to. This means that only user1 can write to that path, but the group, which user2 belongs to, can only read.
If, however, you want a few users to write to that folder, set permissions as 775/664, and add "guest ok = yes" to the samba options for that path.
Keep in mind that samba permissions are subject to the underlying unix permissions and you'll be set.
EDIT: forgot something. If you go down the "force group" route, add the group "groupname" to user1's groups, i.e. usermod -a -G groupname user1
ANOTHER: one last thing (hopefully

), for group writing, use "create mask = 0664". Then group members can write to the same files, i.e. no single user takes ownership of a file, ownership is shared among the group.