Author Topic: File server best practice  (Read 343 times)

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 620
  • The life so short, the craft so long to learn
File server best practice
« on: February 05, 2013, 10:56:38 AM »
Hi all,  I'm setting up a Samba server in my basement for backups and to distribute media in my home.  I'm the only user, so like the other computers in my home there are 2 accounts...mine and root.

The server has 4 drives.  1 OS, 2 ext3, 1 ntfs.  (ntfs is a long story ;-)  )  All already have media or backups on them.

What's the best practice to facilitate reading and writing.  I'm only slightly worried about security.

I have the drives mounted in /mnt.  Who should own the mount point folders, me or root?

What about the folders on the drives?  Me or root?

Any reason I shouldn't use 777 for permissions?

Anything else I haven't overthought?  ;-)

Thanks as always

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6235
Re: File server best practice
« Reply #1 on: February 05, 2013, 11:30:41 AM »

The mount point at "/mnt" should be owned by root.

When it comes to security,it is best to lock down everything and then allow only for specific use cases,"777" permission is not therefore considered "best practice".

Since you are the only person,then it doesnt really matter how you set it up.Start with an open setup,make sure everything works and then start to close it down.

The permissions of the shares will have to depend on your use case but the best place to set permissions is not on the folders themselves but on samba configuration file.

Give samba access to files and folders it needs and then enforce permissions on them through samba configuration file

File sharing is pretty tricky,some manage to set it up without any effort and others take a mountain of effort to get it right.

Best thing to do is solve on problem at a time.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: File server best practice
« Reply #2 on: February 05, 2013, 01:38:12 PM »
Just wondering something ......  do you use Windows to access the shares?

If not is there a good reason to use Samba in preference to any other sharing scheme? ...  maybe NFS ....  or other ...

Just curious  ;)

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 620
  • The life so short, the craft so long to learn
Re: File server best practice
« Reply #3 on: February 05, 2013, 01:45:27 PM »
Thanks muungwana,  that makes sense to me.  This project has developed over time.  Some of my drives had been external in previous lives.  Thus the hodge podge of file types.  I had some issues with an rsync job to a drive whose mount point my user owned.  I suspected one or the other would be more correct.  I wanted to get it right once and for all  ;-)

Just17,  I'm embarassed to tell I have an HTPC running Windows.  Otherwise, I'd be using NFS  ;-)

Dave


Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: File server best practice
« Reply #4 on: February 05, 2013, 01:52:13 PM »
Thanks muungwana,  that makes sense to me.  This project has developed over time.  Some of my drives had been external in previous lives.  Thus the hodge podge of file types.  I had some issues with an rsync job to a drive whose mount point my user owned.  I suspected one or the other would be more correct.  I wanted to get it right once and for all  ;-)

Just17,  I'm embarassed to tell I have an HTPC running Windows.  Otherwise, I'd be using NFS  ;-)

Dave

Thanks ...... was curious to know if there was some other reason ;)

I'm presently using Kaffeine (PCLOS) for the HTPC .....  but will test the new version of XBMC as soon as it hits my repo   ;)

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 620
  • The life so short, the craft so long to learn
Re: File server best practice
« Reply #5 on: February 06, 2013, 07:21:08 AM »
I use a windows program to rip dvd and blu-ray.  For a while I had an XBMC-ubuntu booting from a memory stick.  When I needed to rip I would boot back into windows.  The process became too tiresome so I now I run XMBC-windows.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: File server best practice
« Reply #6 on: February 06, 2013, 08:00:57 AM »
Dunno if this is of any interest to you ;) .......

http://www.pclinuxos.com/forum/index.php/topic,108565.0.html

I don't do BDs so have no need, thankfully.

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 620
  • The life so short, the craft so long to learn
Re: File server best practice
« Reply #7 on: February 06, 2013, 01:07:59 PM »
Thanks for that Just17.  MakeMKV is the program I use.  I'll look into this.  Perhaps I should read more of the forums... not just when I have an issue.  ;-)