Zoandar
Posts: 55
Joined: Sat Apr 06, 2013 9:41 pm

Accesing Shared Files on Windows PCS on my LAN

Tue Apr 30, 2013 2:12 am

I am looking for a guide to help me set up access from my RPi to the various Windows 7 and Windows XP computers on my home LAN. I have succeeded in setting up Samba and accessing a folder on the Pi from both Windows 7 and XP, but I was not finding any information to explain what I need to do to go the other way. Typically each Windows computer will have a shared folder that is accessible from other LAN connected devices. I'd like to be able to read and write to that from the Pi.

Edit - I stumbled across how to access the network shares while using File Manager.

It is not very intuitive, and has a caveat. Click on Go, then Network Drives (even though I have not assigned any network drives) and Windows Networks will appear. Left click on that, and a folder will appear with your workgroup name. Do NOT left-click that, or oddly File Manager jumps to the / level of the file tree on the Pi itself. Instead, RIGHT-click the workgroup named folder, and select File Manager. That will open it an reveal the shares available inside it.

And then I found information on how to make accessing Windows Shares work on this Ubuntu site URL below. I now have the ability to copy and paste files between the Pi and my PCs. :)

http://ubuntuforums.org/showthread.php?t=1810744

Mostly it was a matter of creating the section listed under [share] they show for the samba.conf file, as well as rearranging the "name resolve order" as indicated in that information.

One thing I still cannot do is open a text file on one of the Windows shares, using Leafpad on the Pi, and then edit it, and save it back to the Windows share. Attempting to do so just opens a new unknown named text file on the Pi itself. And when Save is selected no network paths are offered for the save, only the local file structure of the Pi itself. If there is a way around that I would like to learn of it.
- Zoandar -
Current:
Pi-Top Notebook with Pi 3 B v. 1.2
Older hardware:
Rpi Rev B - 512 MB with Rev 2 GertBoard

Ypselonen
Posts: 1
Joined: Wed Jun 12, 2013 5:26 pm

Re: Accesing Shared Files on Windows PCS on my LAN

Wed Jun 12, 2013 5:40 pm

Hi,
Could you help me do the same thing?
I already have the ability of reading and writing in my PI from my windows XP, but the other way I have not.
I clicked in Go > Network Drives as you did, but in my case, I can see nothing there, only a black window with the addres of network:///.
Already tried disabling my windows firewall, still with no success.
Maybe it's the samba configs. Here are mine:

Code: Select all

  GNU nano 2.2.6           File: /etc/samba/smb.conf                            

#============================ Global Setings ====================
[global]
workgroup = WORKGROUP
server string = raspnas server
netbios name = raspnas
dns proxy = no

### Logging
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d

### Authentication
security = user
map to guest = pi

#============================ Sharered Folders ====================

[media]
path = /media
guest ok = yes
guest account = ftp
browseable = yes
read only = no
create mask = 0777
directory mask = 0777
writeable = yes
admin users = everyone
Already tried "sudo chmod 777 /media"
But still the PI can't find nothing in Network Drives

Maybe is something in my Windows?
Regards

axis_mann
Posts: 11
Joined: Sat Oct 13, 2012 3:30 am
Location: Brandon, FL

Re: Accesing Shared Files on Windows PCS on my LAN

Fri Aug 07, 2015 10:51 am

I've seen similar behavior trying to use Leafpad to access a network share on a remote computer using my rPi v2.

I navigate to the file using pcmanFM->go->network, locate and select a share from one of the computers displayed on the network that contains a text file. However, when I click on the text file I want to open, Leafpad opens a new untitled document instead.

I don't think this is a permissions issue because, after using the same procedure to navigate to the text file, I can open, edit, and save the file using gedit instead of Leafpad.

I have found just a few people that have experienced similar problems using Leafpad to access a text file on the share of a remote computer.

However, it's not restricted to just remote computers. The same thing will happen if an attempt is made to use the same technique to edit a text file from a share on the rPi v2.

But, even stranger, Leafpad will open, edit, and save that same file if the share is mounted manually using a mount command. My share on the rPi v2 was named Public.

I could mount the share with the command

sudo mount -t cifs \\\\192.168.2.13\\Public /media -o guest

and then navigate to the mount point /media using pcmanfm where I could then edit the text file which Leafpad. Go figure.

I read that mousepad will work where leafpad doesn't but I had already installed gedit.

I installed gedit with the command

sudo apt-get install gedit

When I select the text file after installing gedit, I can first right click on the file and then select gedit from the drop down list to open the file.

Initially, I though my share won't share but since then I've decided it's just some kind of freaky problem with either pcmanfm's automount or leafpad on the pi.

I repeated the experiment on my Ubuntu machine but didn't experience the same problem with the version of leafpad there. Instead, Leafpad functioned as expected and allowed me to open a text file on a remote share.

I wonder if this problem affects everyone trying to edit a text file on a remote or local share via a pcmanfm->go->network but they just don't know it yet?

Good luck. I'm using gedit now.

jtmoderate876
Posts: 33
Joined: Sat Dec 05, 2015 9:38 pm

Re: Accesing Shared Files on Windows PCS on my LAN

Thu Feb 04, 2016 12:11 pm

With each build of Raspbian (Jessie on my RPi 2) I can initially directly edit text files on my network drive using leafpad but "eventually" I lose this ability and leafpad instead opens an untitled document.

Oddly, once this breaks on a given build it seems to be permanent and, from that build of that OS I can never again directly edit networked text files.

If I rebuild from scratch from NOOBS (1.5) then I can again edit text files.

Today I was working on RPi on a build originally installed on 2016.01.21 and that I have been using regularly for weeks and after one of my reboots I leafpad can no longer edit networked files.

The only things I did were rename my RPi (from raspberrypi to rpiopenhab) and installed Mosquitto but I do NOT believe either of these caused it because this is the first time I've ever installed mosquitto (and I've seen this problem MANY times before) AND I renamed my Pi back to raspberrypi and that didn't help.

So annoying that I now need to copy my file from my network drive to my local user directory or desktop in order to edit it and then copy it back to the network drive.

I wish I could figure this out.

jtmoderate876
Posts: 33
Joined: Sat Dec 05, 2015 9:38 pm

Re: Accesing Shared Files on Windows PCS on my LAN

Thu Feb 04, 2016 12:43 pm

As others suggested above, I have switched to gedit in my latest image.
I guess I will use leafpad in each new build until it breaks and then switch.

Return to “Debian”