![]() If you have files that you don't want others to see, then you need to share those only with certain user accounts. If, for example, you want to share your music of videos, then you may feel that it's okay for anyone on your home network to see them. Depending on what you are sharing, the way you share those files and folders will be different. I have three here at home, and each one is different. How you do this will depend on the NAS you have. If you want your Raspberry Pi to access any files or folders on the NAS then you will have to 'open' access to those files and folders. ![]() This means that it will be able to limit access to files and folders within your home network. Do this with: sudo update-rc.d rpcbind enable Preparing your NASĪll Network Attached Storage drives will have some sort of security built in. You need to turn on the 'rpcbind' service, which is not on by default. You are able to mount shared folders without this facility, but I recommend that you use it to safeguard your files. Turning on File Lockingīeing a secure operating system, Linux has the concept of 'locking' files when they are being accessed by someone. This directory can be anywhere on your Raspberry Pi, and is often in the /media or /mnt directories. For example, go to your home folder and create a new folder with: cd ~ This is the location on your Raspberry Pi where you will find all the files from your network storage. To 'mount' a network storage folder on your Raspberry Pi, you must first create a folder onto which you will 'mount' the external network drive. What we want to do is to add another entry to this list. I'm not going to explain them all as it's not necessary to know what each of them do at this stage. These are, of course, all on the SD card of your Raspberry Pi. dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) Tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=176860k)ĭevpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) Sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) Proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) Tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) Tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=88440k,mode=755) Which will list (at least) the following: /dev/root on / type ext4 (rw,noatime,data=ordered)ĭevtmpfs on /dev type devtmpfs (rw,relatime,size=437904k,nr_inodes=109476,mode=755) ![]() Your Raspberry Pi already has a number of 'drives' mounted, as you can see using the mount command on it's own: mount This is achieved using the 'mount' command. In the Linux world, the task of connecting to a network drive is known as 'mounting' the drive. ![]() Most are - all three of my NAS drives, all from different manufacturers, are Linux-based. I am assuming that your Network Attached Storage (or NAS) is Linux-based, or is sharing NFS storage. What about if you want to be able to access that network drive every time your Raspberry Pi is turned on? Of course, that is possible. In my last tutorial I told you how you can access a network drive from your Raspberry Pi, but when you turn off your Raspberry Pi, that network drive would disappear. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |