Samba is the protocol by which a lot of PC-related machines share files and printers.
apt-get install samba
Temporary File Space
We will create a simple network share
tmp. All users in
WORKGROUP will have read-write access. Let create a directory tree (under
/srv/smb/) we are going to serve.
mkdir -p /srv/smb/tmp
Place the following in
/etc/samba/smb.conf (backup the original file first):
[global]
workgroup = WORKGROUP
server string = Public File Server
security = share
client lanman auth = no
lanman auth = no
[tmp]
public = yes
comment = Temporary File Space (cleaned up at midnight)
path = /srv/smb/tmp
read only = no
hide files = lost+found
Now from Windows machine you can access this share as
\\samba-server-name\tmp. Here is a cron job to make daily clean ups (file
/etc/cron.d/clean-samba-tmp):
SHELL=/bin/sh
35 1 * * * root /bin/rm -rf /srv/smb/tmp/*
See more configuration options
here.