Sharing files and folders over a local network is one of the first things we wanted to do with a Raspberry Pi computer.
There are many, many routers out there and many, many different default options for them. Add to that many, many outdated and sometimes conflicting tutorials on using SAMBA to
share files over a network and you could understand why we moved to SSH and SFTP file transfer for a while.
Then Lucy Hattersley changed the game with her tutorial in issue 80 of the MagPi Magazine. Follow it to the letter. It works beautifully (at the moment of this writing) and even made Bee a cry a little bit.
A few extra notes in case you run into any problems while following this tutorial:
sudo mkdir /path/to/folder/NameOfFolder
command. This will attribute the folder to the root
user instead of the pi
and you won't have the correct permissions to work with the folder.ls -l
command.sudo chown -R pi:pi /path/to/your/folder/FolderName
.192.168.0.33
and your username is the default pi
, access your shared folder with \\192.168.0.33\pi_user\shared\
.
pi
user directory, and make that user directory available, make sure to make that directory readable and writable in smb.conf
! To do that, add a readonly = no
line in the homes
section of smb.conf
.
That's it. Once we worked out the kinks listed above and made sure we were sticking to the tutorial instead of skipping ahead out of habit, everything worked like a charm. Enjoy!