Network Attached Storage - NAS: Difference between revisions

From Embedded Workshop
Jump to navigation Jump to search
(Created page with "Using a Raspberry Pi with 2018-11-13-raspbian-stretch-full.img installed... $ cat /proc/version Linux version 4.14.79-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-N...")
 
No edit summary
Line 40: Line 40:
Adding the following to the end of /etc/fstab  allow the directory to be opened with Windows 7.  Can't write to it from Windows 7.
Adding the following to the end of /etc/fstab  allow the directory to be opened with Windows 7.  Can't write to it from Windows 7.
  UUID=42A7-21CC /share auto nosuid,nodev,nofail 0 0
  UUID=42A7-21CC /share auto nosuid,nodev,nofail 0 0
Try some of the following fstab options:
UUID=42A7-21CC /share auto rw,user,exec,umask=000 0 0
UUID=42A7-21CC /share auto user,auto,fmask=0111,dmask=0000 0 0    <- it appears "auto" is both a file system type as well as a mount option
See: https://help.ubuntu.com/community/Fstab
UUID=42A7-21CC /share vfat defaults,user,fmask=0111,dmask=0000 0 0  <- best bet, although we may want nosuid,nodev,nofail as well

Revision as of 11:51, 3 December 2018

Using a Raspberry Pi with 2018-11-13-raspbian-stretch-full.img installed... $ cat /proc/version

Linux version 4.14.79-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1159 SMP Sun Nov 4 17:50:20 GMT 2018

Using the following guide: https://www.raspberrypi.org/magpi/samba-file-server/

Setting up a Samba File Server

$ sudo apt-get install samba samba-common-bin

Add the following at the end of /etc/samba/smb.conf $ sudo leafpad /etc/samba/smb.conf

[share]
   comment = Pi shared folder
   path = /media/pi/42A7-21CC
   browseable = yes
   writeable = Yes
   only guest = no
   create mask = 0777
   directory mask = 0777
   public = yes
   guest ok = Yes
   read only = No

If the shared directory is visable to Windows 7, but unable to open the folder, the problem is Linux permissions with the folder.

https://askubuntu.com/questions/683034/how-to-automatically-mount-usb-flash-drive-at-startup

pi@raspberrypi:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 1 57.7G 0 disk └─sda1 8:1 1 57.7G 0 part /media/pi/42A7-21CC mmcblk0 179:0 0 29.8G 0 disk ├─mmcblk0p1 179:1 0 43.9M 0 part /boot └─mmcblk0p2 179:2 0 29.8G 0 part /

sudo blkid /dev/sda1 | awk -F'"' '{print $2}'

42A7-21CC

Adding the following to the end of /etc/fstab allow the directory to be opened with Windows 7. Can't write to it from Windows 7.

UUID=42A7-21CC /share auto nosuid,nodev,nofail 0 0

Try some of the following fstab options:

UUID=42A7-21CC /share auto rw,user,exec,umask=000 0 0
UUID=42A7-21CC /share auto user,auto,fmask=0111,dmask=0000 0 0     <- it appears "auto" is both a file system type as well as a mount option

See: https://help.ubuntu.com/community/Fstab

UUID=42A7-21CC /share vfat defaults,user,fmask=0111,dmask=0000 0 0  <- best bet, although we may want nosuid,nodev,nofail as well