2

I'm a linux noob and I'm trying to configure a simple NAS using my pi. I have done the configuration and mounted the USB flash drive (formatted using Fat32) to the /media/USBHDD1/shares folder but I'm unable to write to the shares folder for some reason. I have tried changing the permissions using chmod (command below) but this does not help. Can someone please help?

sudo chmod -R 777 /media/USBHDD1/shares

Samba config:

[global]
   workgroup = WORKGROUP
   server string = %h server
;   wins server = w.x.y.z
   dns proxy = no
;   name resolve order = lmhosts host wins bcast

[Files]
comment = Backup Folder
path = /media/USBHDD1/shares
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writeable = yes
browseable = yes

Also, the guide i have followed to do this setup is http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/

I can read files with no issues but I get the following error when I try to write a file in windows

enter image description here

  • When you first open the network share with Windows, are you asked for a username and password? If so what username/password do you use? The guide mentions Remove the # symbol from the security = user but your config file doesn't have security=user – Jobbo Jun 18 '14 at 13:59
  • "sudo chmod -R 777 /media/USBHDD1/shares" won't work - Fat32 system doesn't have such attributes. When you mount USB stick use umask=000 parameter (this is like 777 permissions) – jet Jun 18 '14 at 23:24
  • @Jobbo yes it does. I made a new account and associated it with samba just like the guide mentions (uncommented security=user). It lets me log in with the credentials on windows but doesn't let me write. Is it possible to point the path directly to the usb drive rather than having to mount the drive to a folder and then pointing the path to it? – Hamed Jun 19 '14 at 3:35
  • @user17544 no thats not possible. The drive has to be mounted for Samba to see/share it. @jet raises an interesting point about FAT32, the part of the guide that talks about editing /etc/fstab would need to be: /dev/sda1 /media/USBHDD1 auto noatime,umask=000 0 0 I think – Jobbo Jun 19 '14 at 6:18
  • I suggested OpenELEC as a Samba alternative solution but it got removed. User17544 is after a Samba solution and has found a problem. Find a fix or a built for purpose Samba solution. Does the Samba share have to be in Raspbian? – Andy Anderson Sep 19 '18 at 21:58
0

Change the shared folder file permissions to read and write for others: Right click folder -> properties -> permissions. Change access to create and delete.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.