Game Development Reference
In-Depth Information
Samba can be quite difficult to understand in terms of permissions. Let's start off
with the public share. You will notice that we put a line in smb.conf that says force
user = "root" . We do this because we created the public directory as root user,
so the permissions applied to the directory and all the files to be created later can
only be for the user root! So, we tell Samba to imitate guests, as root, so that they
can read/write as the root user.
It is bad practice to force the root user to use the Pi account that comes with
Raspbian instead.
The same will apply for the user James Bond and his directory. If you created the
work directory as the root user or Pi, even James Bond will not be allowed to write
new files. To overcome this problem, you can simply change the owner of the folder
by typing the following command line:
chown bond007:users /mnt/USB001/work
You can also assign a directory to an entire group by replacing bond007 with users.
The command would look like chown users:users … . This means that anybody in
the group can write and delete files on that folder now.
The configuration file has many advanced features and I recommend reading the
online manual to learn more about security, sharing printers, and even how to get
Samba to act like a Windows domain server!
You can now use any Windows computer to browse the network and access the
newly created shares.
AFP for Macintosh
Samba also works with Macintosh, but Apple has its own networking protocol called
Apple Filling Protocol (AFP). There is a software that you can install on the Pi so that
your Macintosh computers can detect the Raspberry Pi. Place it in the shared section
of the sidebar.
Installing and configuring
Installing Netatalk has become really easy as most of the configuration is set up by
default. At the time of writing this topic, the version used is 2.3.3.
sudo apt-get install netatalk
Within 30 to 60 seconds, you should not see your Raspberry pop up in the shared
section on your Macintosh. The default directory that is shared is the home directory
of the user that you log in as, for example, user Pi.
 
Search WWH ::




Custom Search