Tired of paying hundreds of dollars for commercial file serversoftware? Looking for an application that lets you share *NIX andWindows files seamlessly across a network? Say hello to Samba, softwarethat's so cool, it'll make you want to kick up your heels and dance,dance, dance!
When you configure a temporary file area on the server using the bare-bones setting above, files and directories created in that area by a specific user are owned by that user alone, and other users cannot delete them. This is because the user and group permissions assigned to each file and directory by Samba reflect the user and group permissions of the connecting client.
This may be advisable in some cases; however, at other times, it can nullify the very purpose of a public file area. In case you'd like to change this default behaviour, you can force Samba to assign every file in this share a particular set of permissions - those that allow full access to all users - so that users can view and delete each other's files. The following configuration directives demonstrate:
[temp]
comment = Temporary file area
path = /tmp
read only = no
guest ok = yes
force create mode = 0777
force directory mode = 0777
force user = nobody
force group = nobody
and try creating a file in this temporary area - you'll see
that the file is created with world-writeable permissions, and with user and group both set to "nobody", the least privileged user on most UNIX systems. This allows every user to view and delete every other user's files in the temporary area, making it truly "public".
You can simplify the process of starting and stopping Samba by creating a few simple shell scripts to do the job for you. Here are the scripts I'm using: