Linux: The Lay of the Land and the Filesystem Hierarchy Standard
-
@scottalanmiller said:
Relative paths work slightly differently. Relative paths care what our current working directory is (as shown by pwn.)
There's typo in there, pwn instead of pwd.
-
@marcinozga said:
@scottalanmiller said:
Relative paths work slightly differently. Relative paths care what our current working directory is (as shown by pwn.)
There's typo in there, pwn instead of pwd.
Fixed. That's a funny typo.
-
@scottalanmiller said:
@marcinozga said:
@scottalanmiller said:
Relative paths work slightly differently. Relative paths care what our current working directory is (as shown by pwn.)
There's typo in there, pwn instead of pwd.
Fixed. That's a funny typo.
Indeed
-
Info on what the specific directories are used for is extremely helpful. That will make finding applications much easier in the future.
-
I am enjoying filling the gaps of my knowledge of Linux. Thanks!
-
What is the "best practice" or "what people usually do" if you are setting up a Linux file server and want to share files?
Is there a standard place to share them?
I mean, in Windows you could share all your files out under your C:\windows directory, but no one does that.
-
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
What is the "best practice" or "what people usually do" if you are setting up a Linux file server and want to share files?
Is there a standard place to share them?
First we need to define the question, as there is a yes and a no, depending.
Do you mean:
- Share files on the system with other users on the system?
- Share files out to other systems via a network file system (e.g. NFS or SMB?)
-
In the case of NFS, there is a convention of making a /exports location that is used solely for that purpose. This is to make it painfully clear to anyone using the system what that directory is used for and to expect anything that they put there to be exposed to the outside world. You could also do /var/exports and be well within convention limits.
-
The standard place for sharing files with other people on the same system is the /var folder. Outside of your /home directory, /var is really the only place that you would expect people to be putting files in any fashion because it is the only place where changes in filesystem size are expected to occur (other than /home.) So this is very much the purpose of /var along with obvious things like system log files and whatnot. Files (rather than applications) that are expected to be used generally rather than by a single person and are not the configuration text files of /etc.
-
If you are sharing something temporary in the sense of "Hey George, I dropped that file in a spot where you can grab it, delete it when you are done, thanks." you would use /tmp. Anyone can just throw whatever into /tmp but don't be surprised if it just gets deleted at random. If you ever have to say "Who deleted /tmp, I was storing something in there", you'll look like an idiot. It's the same as people storing things in their trash on the Windows desktop.
-
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
In the case of NFS, there is a convention of making a /exports location that is used solely for that purpose. This is to make it painfully clear to anyone using the system what that directory is used for and to expect anything that they put there to be exposed to the outside world. You could also do /var/exports and be well within convention limits.
Would NFS shares for internal use (say to set up an NFS share for XO to backup to) also go there? As opposed to "the outside world"? Or by the outside world, do you mean any system that is NOT this system?
-
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
The standard place for sharing files with other people on the same system is the /var folder. Outside of your /home directory, /var is really the only place that you would expect people to be putting files in any fashion because it is the only place where changes in filesystem size are expected to occur (other than /home.) So this is very much the purpose of /var along with obvious things like system log files and whatnot. Files (rather than applications) that are expected to be used generally rather than by a single person and are not the configuration text files of /etc.
What about sharing with people NOT on the same system? For example if I had 50 PDF documents from HR I wanted all 50 of my Windows users to have access to on their individual Windows machines?
-
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
The standard place for sharing files with other people on the same system is the /var folder. Outside of your /home directory, /var is really the only place that you would expect people to be putting files in any fashion because it is the only place where changes in filesystem size are expected to occur (other than /home.) So this is very much the purpose of /var along with obvious things like system log files and whatnot. Files (rather than applications) that are expected to be used generally rather than by a single person and are not the configuration text files of /etc.
What about sharing with people NOT on the same system? For example if I had 50 PDF documents from HR I wanted all 50 of my Windows users to have access to on their individual Windows machines?
If you are sharing FROM Linux TO Windows, then you are presumably going to be doing so with Samba to present the SMB protocol to the Windows users. There isn't the strong tradition with Samba, but the same rules would apply. Something like /var/exports or /exports or /var/samba-exports would be best.
-
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
In the case of NFS, there is a convention of making a /exports location that is used solely for that purpose. This is to make it painfully clear to anyone using the system what that directory is used for and to expect anything that they put there to be exposed to the outside world. You could also do /var/exports and be well within convention limits.
Would NFS shares for internal use (say to set up an NFS share for XO to backup to) also go there? As opposed to "the outside world"? Or by the outside world, do you mean any system that is NOT this system?
NFS is for the "outside world". While it is technically possible to loop back NFS and mount it on the same system that has shared it, that's not a production use case. NFS is how you make the UNIX world's equivalent of "mapped drives" from the Windows world.
For example, if you had 100 PCs running Linux Mint and you had an Ubuntu file server and you wanted to have a single shared directory on the network that stored all of your ISOs that everyone uses, you would share that via NFS from the Ubuntu server and all of the PCs could either browser to it or mount it permanently and it would look and feel just like their normal file system (but slower). Exactly like a Windows mapped drive.
-
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
In the case of NFS, there is a convention of making a /exports location that is used solely for that purpose. This is to make it painfully clear to anyone using the system what that directory is used for and to expect anything that they put there to be exposed to the outside world. You could also do /var/exports and be well within convention limits.
Would NFS shares for internal use (say to set up an NFS share for XO to backup to) also go there? As opposed to "the outside world"? Or by the outside world, do you mean any system that is NOT this system?
NFS is for the "outside world". While it is technically possible to loop back NFS and mount it on the same system that has shared it, that's not a production use case. NFS is how you make the UNIX world's equivalent of "mapped drives" from the Windows world.
For example, if you had 100 PCs running Linux Mint and you had an Ubuntu file server and you wanted to have a single shared directory on the network that stored all of your ISOs that everyone uses, you would share that via NFS from the Ubuntu server and all of the PCs could either browser to it or mount it permanently and it would look and feel just like their normal file system (but slower). Exactly like a Windows mapped drive.
I consider "the outside world" to be anyone outside my edge firewall. That's why that terminology confused me.
So you are considering any share with anyone off the machine to be "the outside world" which I could see also being technically true.
-
So to wrap this question up...
Anything to be shared with users not on the local machine should be stored in /var and probably /var/exports
So a file structure such as
/var/exports/HRdata
/var/exports/XObackups
/var/exports/userhomefolders
/var/exports/sharedDOCSWould be what you are expecting to see on a Linux file server....?
-
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
In the case of NFS, there is a convention of making a /exports location that is used solely for that purpose. This is to make it painfully clear to anyone using the system what that directory is used for and to expect anything that they put there to be exposed to the outside world. You could also do /var/exports and be well within convention limits.
Would NFS shares for internal use (say to set up an NFS share for XO to backup to) also go there? As opposed to "the outside world"? Or by the outside world, do you mean any system that is NOT this system?
NFS is for the "outside world". While it is technically possible to loop back NFS and mount it on the same system that has shared it, that's not a production use case. NFS is how you make the UNIX world's equivalent of "mapped drives" from the Windows world.
For example, if you had 100 PCs running Linux Mint and you had an Ubuntu file server and you wanted to have a single shared directory on the network that stored all of your ISOs that everyone uses, you would share that via NFS from the Ubuntu server and all of the PCs could either browser to it or mount it permanently and it would look and feel just like their normal file system (but slower). Exactly like a Windows mapped drive.
I consider "the outside world" to be anyone outside my edge firewall. That's why that terminology confused me.
So you are considering any share with anyone off the machine to be "the outside world" which I could see also being technically true.
Yes, to the server which is sharing them, anything beyond the NIC is the outside world. And the difference between "your LAN" and the "great Internet" is only a matter of crossing a router boundary, it's all one and the same thing to the server.
-
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
So to wrap this question up...
Anything to be shared with users not on the local machine should be stored in /var and probably /var/exports
So a file structure such as
/var/exports/HRdata
/var/exports/XObackups
/var/exports/userhomefolders
/var/exports/sharedDOCSWould be what you are expecting to see on a Linux file server....?
Yes, that would be a very good approach.
-
@scottalanmiller said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
@BRRABill said in Linux: The Lay of the Land and the Filesystem Hierarchy Standard:
So to wrap this question up...
Anything to be shared with users not on the local machine should be stored in /var and probably /var/exports
So a file structure such as
/var/exports/HRdata
/var/exports/XObackups
/var/exports/userhomefolders
/var/exports/sharedDOCSWould be what you are expecting to see on a Linux file server....?
Yes, that would be a very good approach.
Thanks!
Hope it was a good question.