I've set up samba on raspbian Jessie, and I am able to get to the "pi" user's folder from a windows box.

I want to be able to get to the /etc/ directory from windows because I want to edit conf files in the warm bosom of notepad instead of using nano. I've set up the below with the path specifically pointing at /etc and with just /.

   read only = no
   locking = no
   path = /etc
   guest ok = yes

and I gave All users write access to the /etc folder with chmod. I can see the \\raspberrypi\root share in windows, and it prompts me for my credentials. but then it says it's not accessible, because either I don't have permissions, or I have another connection to the server with a different username.

I've searched around the internet for this, but it's difficult searching for "raspbian etc" because every configuration tutorial in the world seems to involve the /etc folder.

  • How did you give all users permission? sudo chmod 777 /? Commented Feb 24, 2016 at 4:18
  • I think it was sudo chmod ar+w /etc. something like that. but started over with a fresh image to try out your answer.
    – Curtiss
    Commented Feb 26, 2016 at 4:32
  • Which file did you just show?
    – SDsolar
    Commented Dec 3, 2016 at 2:58
  • Are you on Windows 10?
    – Gaia
    Commented Apr 14, 2017 at 6:08

4 Answers 4


Assuming that you are using Notepad++ to edit the said files, setting up samba is just overkill. There is a plugin in Notepad++ called nppFTP which you can use to login to the Raspberry Pi over SFTP and then edit and save any file in /etc or any directory for that matter. For an added bonus, you could setup ssh key based authentication for the root user so that you can login to SFTP with the root user and not have to change permissions in /etc directory.


I have my root folder shared on my Pi. My config is a bit different than yours:

    comment = root
    valid users= pi, root
    only guest=no
    create mask=0777
    directory mask=07777
    force user = root

valid users makes it so that the user pi and the user root have permission to access /. force user makes it so that all files written over smb will be done be root, even though pi can still write files, it will look like root did it.

Make sure you do:

sudo smbpasswd -a pi and sudo smbpasswd -a root

after you edit this file, so you can set a password for both users.

NOTE: Never allow guest/public access to your root folder, it's not only outrageously insecure, but it's probably bad practice to broadcast your entire filesystem to anyone with a computer in the area.

  • patrick, I copied and pasted your config, and created the pi and root smb users. now when I open \\raspberrypi\root, I am not prompted for credentials, and I can see all the folders underneath. but when I try to open any of them, I get a 'not accessible... unexpected error occurred". I've restarted the samba service as well.
    – Curtiss
    Commented Feb 26, 2016 at 4:18
  • Which file is this config located in?
    – SDsolar
    Commented Dec 3, 2016 at 2:58
  • @SDsolar /etc/samba/smb.conf
    – seymar
    Commented Dec 5, 2016 at 20:49

I would have used Filezilla (SFTP graphically) and then copied, backed up, edited and sent back the update.


Change the path of the directory to / so you can access every thing

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.