share drive

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
driewiel
Level 1
Level 1
Posts: 4
Joined: Sat Nov 02, 2013 5:30 am

share drive

Post by driewiel »

LinuxMint 16 XFCE

How do I share a drive or folder between 2 Linux computers? What do I need to install?

User avatar
WharfRat
Level 21
Level 21
Posts: 13832
Joined: Thu Apr 07, 2011 8:15 pm

Re: share drive

Post by WharfRat »

driewiel wrote:LinuxMint 16 XFCE

How do I share a drive or folder between 2 Linux computers? What do I need to install?
I use nfs. You would need to install nfs-kernel-server and nfs-common
ImageImage

altair4
Level 19
Level 19
Posts: 9909
Joined: Tue Feb 03, 2009 10:27 am

Re: share drive

Post by altair4 »

Samba can be used for this and the samba server is already installed by default. All you may need is a way to create a share.

*** You can create the share manually by adding a share definition to the end on /etc/samba/smb.conf.

*** You can install a gnome utility:

Code: Select all

sudo apt-get install system-config-samba
*** You can even add a Thunar Custom Action so you can create a share from Thunar: http://forums.linuxmint.com/viewtopic.php?f=197&t=88255

The beauty of using Samba in an all Linux network is that you can bypass all the Windows specific stuff that comes with it. On the other Linux box you can access the machine's samba shares directly by name and bookmark it:

Code: Select all

thunar smb://hostname.local
Where hostname is the host name of the box with the share.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

driewiel
Level 1
Level 1
Posts: 4
Joined: Sat Nov 02, 2013 5:30 am

Re: share drive

Post by driewiel »

Tried both. I will struggle some more.



Only thing that did work was sharing the documents folder from Lubuntu to Mint. Not the one drive that is NTFS. I managed to change permissions with NFS. But still not accessible on the network. Maybe convert it to Fat32 and see what happens.

I'm also not sure what users to add. Me? Or nobody? Or sambashare? Who are all those users? But not a 'everybody'.

It's one of those Linux things that still has a long way to go. Should be easy. It isn't. I don't have secret files with weapons of mass destruction on my computer. I'm not 007. Why do they make it so difficult to share files on my own home network?

User avatar
WharfRat
Level 21
Level 21
Posts: 13832
Joined: Thu Apr 07, 2011 8:15 pm

Re: share drive

Post by WharfRat »

Here's how I have it setup. On the machine I connect to, there's a /media/vgshared directory chowned $USER:$USER that's a mount point for a volume group.

The file /etc/exports contains

Code: Select all

/media/vgshared		192.168.1.0/24(rw,no_subtree_check,async,no_root_squash
On the machine I connect from I have the directory /mnt/ws490/vgshared also chowned $USER:$USER

To connect, I have a script but the jist of it is

Code: Select all

mount -t nfs,defaults 192.168.1.101:/media/vgshared /mnt/ws490/vgshared
If using nfs it would be best to assign a static IP address to the machine you're going to connect to. You can easily do that via network manager.

Good luck :wink:
Last edited by WharfRat on Thu Feb 20, 2014 8:50 pm, edited 1 time in total.
ImageImage

User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: share drive

Post by grimdestripador »

Simplest file share ever, setup SSH on your server. Then use filezilla client to SFTP.
1) Simple to setup, sudo apt-get install ssh filezilla
2) Simple to use, your password is already your system user.
3) Available Everywhere. Programs like winSCP, Filezilla, sshfs make for many options
4) Secure, its SSH. No open security holes like samba and NFS.

If you want it mounted like a network drive, i suggest using sshfs on the client and setting up trusted RSA public/private keys, such that you securly login without having to enter your password.

altair4
Level 19
Level 19
Posts: 9909
Joined: Tue Feb 03, 2009 10:27 am

Re: share drive

Post by altair4 »

driewiel wrote:I'm also not sure what users to add. Me? Or nobody? Or sambashare? Who are all those users? But not a 'everybody'.
By golly, I think I cracked the code.

You aren't using system-config-samba you are using shares-admin. Use system-config-samba:

Code: Select all

gksu system-config-samba
Then share the folder:
Share.png
Then allow everyone to access it:
Everyone.png
The only thing left is to change permissions to allow "everyone" access to the actual folder - in this example:

Code: Select all

chmod 777 /home/tester1/Public
If NTFS is involved with this a chmod will not work so it depends on how you mounted the partition which requires a wholde new set of questions. If you are mounting it through the file manager or if its an external usb device there's a simple fix.

Anywho, far too many voices in this thread already I just couldn't resist the challenge of a totally cryptic post :)
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Post Reply

Return to “Newbie Questions”