1

I have a 1TB drive inside my desktop (running Ubuntu 15.04) that serves as a network share in my home. I have done the following to it

  chmod -R +775 /media/<me>/<share>
  chown -R <me>:share /media/<me>/<share>
  adduser <me> share
  adduser <GF> share

Then gone into the Disk's Properties and Chosen to share it over the network. However When try to connect from it from both our laptops running 14.04.2 LTS it can never connect even though we are using our logins from the Desktop.

Other posts relating to this issue are years old and have not gotten me ny responses. As this is the first time I have attempted to share something over the network on Linux I would greatly appreciate any help you could offer. Thanks!

UPDATE When trying the steps mentioned from the post commented by the moderator I recieved an error that I do not have permission to access that location. This makes no sense beacuse I made a group for this drive, added ourselves to that group and gave us rwx permission on that drive.

in the connect to sever dialog I entered the following

  sftp://<gf>@192.168.blah.blah/<share>

AND

  sftp://<gf>@192.168.blah.blah/media/<me>/<share>

I am familiar with VSFTPD but don't think that's practical being as I dont think I need an FTP server when Ubuntu has something built in to accomplish this.

UPDATE2: Thanks to user68186 for working with me on this! To make my configuration a little Clearer I have the following

OS Drive /dev/sdc - The OS Drive

The Share Drive: /dev/sdc - The Share Drive Itself ext4 /dev/sda1 - The ONLY Partition on /dev/sdc (Share Drive) ext4

What I have done So far: http://pastebin.com/2CHZr42A

now I just need to make it accessible to users on my home network!

1 Answers1

2

Step 1: Create a mount point for the partition to be shared (sda1 in this case)

Open a terminal by pressing Ctrl+Alt+T and create an empty folder called shared in not there:

sudo mkdir /media/shared

Find the UUID of the partition you want to share:

sudo blkid

copy the UUID of the partition you want to share (/dev/sda1 in this case).

Make a backup of /etc/sftab and then edit the file

sudo cp /etc/fstab /etc/fstab.original
sudo nano /etc/fstab

Add the following line:

UUID=your-UUID-here /mnt/shared ext4 defaults 0 1

Use the actual UUID you had copied before instead of your-UUID-here.

To make the changes you made take effect, run the command:

sudo mount -a

Step 2: Give everyone read and write permission for the shared partition

sudo chmod -R +777 /mnt/shared

Step 3: Install ssh-server if not installed

sftp is part of ssh and works with Ubuntu to Ubuntu file sharing If you are using Windows in the laptop, see How to share files through the local network? for using the sambaprotocol that works with Windows.

sudo apt-get install openssh-server

Step 4: Create a bookmark for the shared desktop drive in the laptop

Log into the laptop as gf

Open Nautilus and find the Menu item "Connect to server".

enter image description here

Under the server address enter. This assumes gf has an account in the desktop, if not replace gf with the user-ID of the desktop account holder below:

sftp://`gf`@192.168.blah.blah/mnt/shared

Press Connect. You will see a password dialog box:

enter image description here

Enter the password associated with gf (or the desktop user_ID) and select if you want the password is to be remembered or not. Again click Connect.

Now you should see your shared desktop drive.

Notice there is a new entry under Network on the left panel of Nautilus that begins with the user_ID used to connect to the shared folder. Right click on it and choose "Add Bookmark" to create a permanent bookmark for your laptop's home folder in the Nautilus of the Desktop.

Follow the same process for other users such as me.

Hope this helps

user68186
  • 33,360