Best place to make a directory for Samba?
I am running CentOS 6.4 with SELInux. I would like to know what would the ideal or best solution as to where to create a directory for Samba. This directory will be shared by myself and one other person, privacy isnt really a big thing for me right now. I was thinking making a directory called "SambaShared" either on the root of the filesystem or in the /usr file. What would you suggest?
Please note the following- Making directories in the /home folder isnt really an option due to SELinux, on restart SELinux will re-write the permissions forcing me to constantly have to use some command such as "setsebool" everytime I restart the PC. Some notes from Samba for you guys- Code:
# SELINUX NOTES: |
Doesnt matter where you put it as long as you know where you put it and the filesystem has enough room.
|
Creating a directory in the / of the filesystem should no be a problem. I use a sub-directory of the /mnt partition, just a personal choice.
|
I also use a subdirectory of /mnt for samba and nfs mounts. It's just easier for me to remember if I stick them all in the same place.
|
So what about in /usr,is that fine?
|
You can place it wherever you want. This is where being a good sys admin comes into play.
Do a df -h, examine how much space you think you might need for your samba share, and then make your own decision. As other have said they all have their personal preference. I have always made a separate file system because my samba shares were writable by users and we all know a user can be dumb and try to upload a 500 GB video they found online of kittens and would not check to see there was only 300GB left before they tried to upload it. That way they could only bring that filesystem to a halt and my root was never in danger. |
Quote:
|
I chuckle because you mention virus and partition, both of which are moot points in the Linux world.
Yes a Linux system can be compromised. However, if someone does compromise the system that means they have elevated themselves to super user(root) privileges and in theory could mount or unmount or do whatever they wanted. |
Quote:
|
Hi,
Quote:
See, for example http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE18 Evo2. |
Quote:
Shenanigans. /usr is apart of the user's path for a reason and any scripts created that are to be used by all users should be placed in one of its subs, usually /usr/local/bin/. The directory "/usr/" should never be directly written to, but creating a sub dir under it is perfectly acceptable and is noted on the link you provided under FHS 2.3 |
Hi,
perhaps I missed something, but I was under the impression that this was not going to be static data. The 2nd sentence in the section I linked to states: "/usr is shareable, read-only data" Evo2. |
Quote:
Evo2 you aren't reading deep enough. The FHS states that "/usr/" should not be written to. But "/usr/local/sambashare" or even "/usr/sambashare" is perfectly acceptable within the FHS. The local subfolder of FHS is basically made for this purpose, although the original design was to be a place for users to place all of their own custom created binaries and scripts. |
http://www.pathname.com/fhs/pub/fhs-2.3.html#AEN1450
I guess it should be in /usr/local/ as creating your own sub under /usr/ is nto advised as it could be overwritten. But anything inside of /usr/local is perfectly safe. |
Quote:
Quote:
The /srv directory is the right place for services Quote:
Of course this all only applies if you want to be FHS compliant, otherwise just put it were you want. |
All times are GMT -5. The time now is 05:02 PM. |