How To - Simple File Sharing in Mint

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Re: How To - Simple File Sharing in Mint

Postby daibak on Wed Feb 09, 2011 4:58 pm

altair4,

After trying the most simple set-up you described, a Nautilus file share, on my Linux Mint 10 (8-yr-old HP Pavilion) Notebook PC I was still frustrated for a couple of hours with a second Windows Vista laptop on the same home network both behind a router to the Internet as only the Mint shared directory showed up on the Windows machine; but, of the shared directory on the Windows machine, not a sign on the Linux Mint 10 box. After trying umpteen things in vain to fix it which I can no longer recall in detail I went back to your original instructions and tried this gem when I recalled the Nautilus share wizard had never asked me for the workgroup name:


(2) There is a bug in the nautilus-share package as of this writing that does not change the username and groupname to your name and group for any file that a remote user adds to your share. This makes it impossible for you to write to that file. Here is a workaround: add the following line to the [global] section of etc/samba/smb.conf :
force user = whatever_your_mint_user_name_is



So, as you said, I opened etc/samba/smb.conf in gedit and added this line all on its own at the very end of the Global section and saved it:

Code: Select all
force user = mylinuxmint10username

(I inserted this username line without any leading semi-colon)

Voilá, by miracle, Linux Mint 10 now shows the second Windows Vista machine and I can read and write to its directory.

Bless you, good sir!
daibak
daibak
Level 1
Level 1
 
Posts: 4
Joined: Fri Nov 19, 2010 4:19 pm

Linux Mint is funded by ads and donations.
 

Re: How To - Simple File Sharing in Mint

Postby llogg on Sun Mar 06, 2011 6:24 pm

daibak wrote:altair4,

After trying the most simple set-up you described, a Nautilus file share, on my Linux Mint 10 (8-yr-old HP Pavilion) Notebook PC I was still frustrated for a couple of hours with a second Windows Vista laptop on the same home network both behind a router to the Internet as only the Mint shared directory showed up on the Windows machine; but, of the shared directory on the Windows machine, not a sign on the Linux Mint 10 box. After trying umpteen things in vain to fix it which I can no longer recall in detail I went back to your original instructions and tried this gem when I recalled the Nautilus share wizard had never asked me for the workgroup name:


(2) There is a bug in the nautilus-share package as of this writing that does not change the username and groupname to your name and group for any file that a remote user adds to your share. This makes it impossible for you to write to that file. Here is a workaround: add the following line to the [global] section of etc/samba/smb.conf :
force user = whatever_your_mint_user_name_is



So, as you said, I opened etc/samba/smb.conf in gedit and added this line all on its own at the very end of the Global section and saved it:

Code: Select all
force user = mylinuxmint10username

(I inserted this username line without any leading semi-colon)

Voilá, by miracle, Linux Mint 10 now shows the second Windows Vista machine and I can read and write to its directory.

Bless you, good sir!
daibak
I second this post. Thank you for this thread. Incredibly helpful.
Intel Pentium Dual 2.00 GHz
2Gb RAM
Linux Mint Cinnamon 14
llogg
Level 3
Level 3
 
Posts: 112
Joined: Sat Feb 12, 2011 6:56 pm

Re: How To - Simple File Sharing in Mint

Postby TomatoBoy on Thu May 12, 2011 7:17 am

I wonder please if someone might be able to shed some light on a problem that has me stumped despite a great deal of forum searching. My apologies if this has been dealt with, I am very new to Linux and may well miss sometrhing through newbie confusion.

We have a network with a Netgear router handling all dhcp for two Windows 7 computers, and up until now a laptop running Mint 10. With Altair's excellent guide and other resources around the net we managed to set-up file sharing through Nautilus with guest access allowed. A second Mint PC has joined the fold and also the sharing via Nautilus.

We decided to add Samba users/password access for security on both Mint units via the smbpasswd method in Altair's text.

We decided to remove the accounts after having multiple error messages (which I have not recorded, sorry) and some issues accessing the shares from the Mint machines. Both Mint machines had the Samba users/password removed using the -x switch.

Everything is fine again Mint > W7 and W7 > Mint except on the new Mint PC whose shares can be accessed by all the other computers and it can access the other Mint computer but when it is asked to access the W7 computer shares it now produces a login box and despite being provided with the correct password the following error is produced:

Unable to mount location dbus error org.freedesktop.dbus.error.noreply: message did not receive a reply (timeout by message bus)

Two things, I now notice that after accessing shares on other computers the folders concerned are mounted on the desktop of the (working) Mint PC until it is switched off. I don't remember that happening before though it probably was. Any confirmation of the correct behaviour of this would be gratefully received.

Also, just to point out that it was possible to access the W7 shares on the Mint PC that is now playing up before we did the Samba users/password thing :(

Can anyone please help me? I am beyond my learning curve at the moment. Many thanks.
TomatoBoy
Level 1
Level 1
 
Posts: 5
Joined: Thu Feb 24, 2011 1:56 am

Re: How To - Simple File Sharing in Mint

Postby altair4 on Thu May 12, 2011 7:37 am

Unable to mount location dbus error org.freedesktop.dbus.error.noreply: message did not receive a reply (timeout by message bus)

There is an old bug concerning saved passwords to remote shares. Did you have it remember the username and password "forever"? If so this might be a known bug: https://bugs.launchpad.net/ubuntu/+sour ... bug/463267

There is a workaround mentioned in that bug report that basically deletes the saved username and password so you'll have to authenticate manually. To find the saved username and password:

Menu > Accessories > Passwords and Encryption Keys > Passwords Tab

Expand the "Passwords: login" entry and you should see the the entry for the remote share.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5925
Joined: Tue Feb 03, 2009 10:27 am

Re: How To - Simple File Sharing in Mint

Postby TomatoBoy on Thu May 12, 2011 9:05 am

Hi Altair, thank you so much for the prompt response :)

I checked in the passwords tab and the only one there was for the wireless network, which incidentally had all sorts of driver issues involving the blacklisting of several before it would work at all, and it still will not allow sharing at all, it only works over ethernet.

Then, I tried logging onto the W7 share for the duration of the session, you rightly suggested I was trying the 'forever' option. The share became accessible straight away, which is great.

Could I please ask a couple of questions, does the bug occur only after a Samba name/password is set or was it going to happen in any case? Could it be related to any of: the wifi driver issue, the fact this is 64 bit and the laptop is 32 bit (and works perfectly 'forever') or anything else I cold have caused? I ask in case a reinstall might resolve the issue? The problem is this is going to be a very basic fileserver and backup location waking on lan (said hopefully)so I have to be sure everything is talking without us interceding each session.

I'm so desperate to use Mint for this, I hope there is a solution.

Thanks again Altair.
TomatoBoy
Level 1
Level 1
 
Posts: 5
Joined: Thu Feb 24, 2011 1:56 am

Re: How To - Simple File Sharing in Mint

Postby karliet on Sat Oct 22, 2011 1:00 pm

There are actually other ways of file sharing through a network such as
dropbox and teamviewer those 2 dont require any setup past making a account and installing on both computers dropbox has a (i think) 2gb limit on the files you can send through it while teamviewer has unlimited because your sending the file directly to the other computer instead of leaving it on a 3rd party server
"If to live, we have to be numb, I'd rather know the pain"
User avatar
karliet
Level 3
Level 3
 
Posts: 115
Joined: Wed Oct 19, 2011 9:15 pm
Location: western hemisphere :D

Re: How To - Simple File Sharing in Mint

Postby altair4 on Sat Oct 22, 2011 2:40 pm

There's also DuktoR4, TransferOnLan, SSH, NFS, and Classic Samba sharing but this is a HowTo on Usershares. That's why it's in the "Tutorials/Howtos" section :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5925
Joined: Tue Feb 03, 2009 10:27 am

Re: How To - Simple File Sharing in Mint

Postby BostonPeng on Fri Jan 13, 2012 2:27 pm

altair4 wrote:For those of you that have installed Mint Debian you have probably noticed that Nautilus-share does not work. There are a few more steps required:

Linux Mint Debian Edition Preliminary Steps

Step 1: "Guest Access" option is disabled by default. To enable it:

Open smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Add the following lines to the [global] section:
Code: Select all
usershare allow guests = yes

Code: Select all
map to guest = Bad user

And restart samba:
Code: Select all
sudo service samba restart


Step 2: You do not have permissions to create a usershare because you are not included in the correct group.
Code: Select all
sudo gpasswd -a your_user_name sambashare


Step 3: Add samba client packages
Code: Select all
sudo apt-get install gvfs-fuse
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc

Then add yourself to the fuse group:
Code: Select all
sudo gpasswd -a your-user-name fuse


Step 4: Logoff and Login again for all the group changes to take affect

There is one more thing I need to tell you. After you select the "Create Share" button nautilus abruptly closes and for a very brief moment your entire desktop will disappear. Fear not - it will return. I have no earthy idea what's going on there but there's probably a Debian bug report somewhere that I will try and find to see if there is a workaround or fix.

Thanks for posting this, altair! I'd been needing to find the fix for this annoying problem.
J.M. "BostonPeng" Hardin
Now very happily running SolydK
My new Linux blog: Tux + Me
It's time for Dodgers baseball!
User avatar
BostonPeng
Level 5
Level 5
 
Posts: 619
Joined: Mon Aug 02, 2010 8:50 am
Location: Boston, MA

Re: How To - Simple File Sharing in Mint

Postby xcat on Sun Jan 22, 2012 7:29 am

For those of you that have installed Mint Debian you have probably noticed that Nautilus-share does not work. There are a few more steps required...



Your instructions solved my sharing problems too. Thanks, Altair4
xcat
Level 1
Level 1
 
Posts: 1
Joined: Sat Jan 14, 2012 6:15 am

Re: How To - Simple File Sharing in Mint

Postby pulf on Fri Apr 20, 2012 2:04 pm

I have done this with good result some times, but now with cinnamon installed it doesn't look the same. When I right click on a folder there isn't the "sharing" to click on. Do I have to go in and write something in smb.conf? Seems a little geekish nowadays.
pulf
Level 1
Level 1
 
Posts: 4
Joined: Mon Sep 22, 2008 6:43 am

Re: How To - Simple File Sharing in Mint

Postby altair4 on Fri Apr 20, 2012 2:38 pm

It sounds like you don't have the nautilus-share package installed:
Code: Select all
sudo apt-get install nautilus-share
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5925
Joined: Tue Feb 03, 2009 10:27 am

Re: How To - Simple File Sharing in Mint

Postby pulf on Tue Apr 24, 2012 4:29 pm

altair4 wrote:It sounds like you don't have the nautilus-share package installed:
Code: Select all
sudo apt-get install nautilus-share


There it was! :D Very simple, but strange it wasn't installed from the beginning.
Thanks!
pulf
Level 1
Level 1
 
Posts: 4
Joined: Mon Sep 22, 2008 6:43 am

Re: How To - Simple File Sharing in Mint

Postby toomuchcoffee on Tue Apr 24, 2012 8:08 pm

Thanks a lot for this :D .
Code: Select all
The program 'suck' is currently not installed.  To run 'suck' please ask your administrator to install the package 'suck'
toomuchcoffee
Level 1
Level 1
 
Posts: 41
Joined: Wed Apr 18, 2012 8:24 am

Re: How To - Simple File Sharing in Mint

Postby jazzcat on Thu May 03, 2012 1:12 am

I've just installed kde on my lmde partition, and streaming etc from samba works fine when I am in the cinnamon de but not when I am in kde. Any thoughts?
jazzcat
Level 1
Level 1
 
Posts: 11
Joined: Sat Feb 04, 2012 8:50 pm

Re: How To - Simple File Sharing in Mint

Postby jazzcat on Thu May 03, 2012 1:18 am

Here is the error I am getting from vlc

Your input can't be opened:
VLC is unable to open the MRL 'smb://christopher@stora/MyLibrary/MyVideos/myvideo.avi'. Check the log for details.
jazzcat
Level 1
Level 1
 
Posts: 11
Joined: Sat Feb 04, 2012 8:50 pm

Re: How To - Simple File Sharing in Mint

Postby altair4 on Thu May 03, 2012 6:23 am

I don't use KDE and have no experience with VLC.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5925
Joined: Tue Feb 03, 2009 10:27 am

Re: How To - Simple File Sharing in Mint

Postby jazzcat on Thu May 03, 2012 9:03 am

the issue appears to be present on dragonplayer as well
jazzcat
Level 1
Level 1
 
Posts: 11
Joined: Sat Feb 04, 2012 8:50 pm

Re: How To - Simple File Sharing in Mint

Postby altair4 on Thu May 03, 2012 9:19 am

Please start a separate topic. Your questions are unrelated to this HowTo.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5925
Joined: Tue Feb 03, 2009 10:27 am

Re: How To - Simple File Sharing in Mint

Postby PcMojo on Wed Oct 31, 2012 5:10 am

@altair4 First of all, thanks a million for this and your many other threads on networking, sharing, Samba etc. They are extremely useful giving step by step instructions, with enough explanation given so we can research something further, without so many details that our eyes glaze over in a fog of confusion! I've had to write technology training materials before and most people don't realize how difficult it is to achieve that balance.

After trying this and the information you've posted in other threads, I still have sharing issues. (probably from childhood :wink: ) I could sometimes see Vista from Mint, but not Mint from Vista (I set up filesharing on Vista) Since it wasn't working, I was going to undo the changes that I made. Upon researching the smbpasswd command I found -d disables and -x deletes the samba account, but neither worked. I figured out why from this article: http://ubuntumanual.org/posts/73/how-to-adddelete-network-users-in-ubuntu It states, “By Default network users are disabled after adding them, make sure you run the enable network user command above. (smbpasswd -e)” So I couldn't delete or disable the accounts because they were never enabled. Perhaps that was my problem all along and the share wasn't working because the Samba accounts were never enabled. If this is accurate, I thought you might want to add it into your instructions.

Sorry for such a long post but I actually do have a question for you. Since moving to Linux, I've gotten accustomed to naming things in lower case. When adding any new network object to Windoze, by default they are named in upper case. If my Linux hostname is mypc and Windoze adds it as MYPC, what to I write in the “netbios =” line in the smb.conf file? Or will I have to rename my Linux host? Am I correct in assuming that case matters when naming the hostname ?

Thanks again, for all of your helpful posts!
Mint 15 with Cinnamon on top of a Dell D620 laptop.
PcMojo
Level 1
Level 1
 
Posts: 28
Joined: Wed Jul 11, 2012 7:01 am
Location: Center of the Storm

Re: How To - Simple File Sharing in Mint

Postby altair4 on Wed Oct 31, 2012 7:19 am

Upon researching the smbpasswd command I found -d disables and -x deletes the samba account, but neither worked. I figured out why from this article: http://ubuntumanual.org/posts/73/how-to ... -in-ubuntu It states, “By Default network users are disabled after adding them, make sure you run the enable network user command above. (smbpasswd -e)”

From man smbpasswd:
-e
This option specifies that the username following should be enabled in the local
smbpasswd file, if the account was previously disabled. If the account was not
disabled this option has no effect.

The "-a" option adds and enables the unix user. The "-e" option is only required if the already added samba user account had been disabled ( -d ).

If my Linux hostname is mypc and Windoze adds it as MYPC, what to I write in the “netbios =” line in the smb.conf file?

Shouldn't matter. Linux is case sensitive but SMB / Samba is not.

EDIT: If your host name is in fact "mypc" you don't need to add "netbios name" in smb.conf. Debian / Ubuntu / Mint automatically makes the netbios name match the host name. It's built into the default. You only need to explicitly add the netbios name in smb.conf if your hostname exceeds the 15 character length rule.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5925
Joined: Tue Feb 03, 2009 10:27 am

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 8 guests