2

I'm following this tutorial to set up RPi file sharing/NAS via Samba.

As per the Client access to NAS instructions I typed my Pi's IP address into the “search program and files box” from the windows command prompt (i.e. \\192.168.1.113\public), and typed in my username and password as per the instructions.

The folder RASPBERRYPI\public now appears in the Win 10 Network folder, but when I double-click the folder the following error message appears:

\\RASPBERRYPI\public is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

The user name could not be found.

I am unsure why I am unable to connect to my Pi, as the SMB server appears to be running properly from the Pi's end.

2 Answers 2

0

I'm fairly certain it is because the permissions / owner on the drives when you mounted them (if you are using external drives) was not set correctly. See the tutorial I am linking. http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/

2
  • This worked so thanks for the quick and helpful reply! I still have a \\public folder in my Network shares though, and it appears that on the Pi my USB drive has been mounted twice in /media (16GB and USBHDD1 respectively). Is there a way to clean these up so only the working folders/mounted drives appear? Commented Nov 28, 2016 at 2:53
  • I'm not 100% sure on your problem but I'd try to sudp rm -r /media/16GB as long as it isn't mounted.
    – Mobalized
    Commented Nov 29, 2016 at 0:33
0

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install samba samba-common-bin

sudo mkdir /home/pi/yourfolder

sudo chmod -R 777 /home/pi/yourfolder

sudo nano /etc/samba/smb.conf

On end of file

[yourfolder]
  comment = shared without password
  path = /home/pi/yourfolder
  browseable = yes
  writeable = yes
  guest ok = yes
  create mask = 0777
  directory mask = 0777

sudo service smbd restart

-- Test your new folder.

3
  • Creating a world readable/writeable share is not only a security issue but likely unnecessary. Commented Jan 5, 2018 at 17:23
  • Very beautiful phrase (I will use). Could you help us solve the problem?
    – Alisson
    Commented Jan 6, 2018 at 4:27
  • sudo mkdir /home/pi/yourfolder sudo chmod -R 777 /home/pi/yourfolder --- supress this commands and add user pi and make one passw to samba. sudo smbpasswd -a pi
    – Alisson
    Commented Jan 6, 2018 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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