Ubuntu/osX file sharing

Spread the word
Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on TumblrEmail this to someonePrint this page

I’ve been fighting with this for quite awhile and I’ve finally found the solution, so I thought I’d share it.

I have an external harddrive hooked up to my Ubuntu home server, a very old PC turned linux. I had created an user for connecting to the external harddrive from my 2 macbook pros and when mounted by that specific user worked fine.

Basically, user1 was my standard login for the server and user2 was the login which I have the macbooks connect to the external harddrive. The default mount point in Ubuntu is /media/{external} and I changed the home directory of user2 to /media/{external}.

But as I said earlier if the server rebooted the harddrive would be mounted under user1 and user2 no longer has permissions on this drive.

So heres the solution I finally found:

fstab

fstab is a file in /etc/fstab and handles how harddrives are mounted to the computer.

So what needs done here? First and most importantly, backup the fstab file:

$ cp /etc/fstab /etc/fstab.bak

You may need to use ‘sudo,’ I did.

Then you’ll need some info about the drive. Get this by using the ‘blkid’ command:

$ sudo blkid
Spread the word
Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on TumblrEmail this to someonePrint this page