Question for linux program integration

Hi, I would like to ask you a question.

From a while, I’m on my big project write in Crystal.
Actually when I use my software (ISM), I always fetch the repository under a Virtual Machine and I run my software after I performed a cd with my terminal.

But now, I would like to put my binary into /usr/sbin (because it require the root/sudo privileges)

But I think some problems will occur, specially with the path, because I can’t put the files my program use under the /usr/sbin path, it’s not the purpose for this path.

How I have to proceed for that ?

This is question is best answered with the original source of information for this: Filesystem Hierarchy Standard

This document describes the " the conventions used for the layout of a UNIX system", the places where which files should live in the filesystem.

If you need help with deciding in which category some file falls, you can maybe describe the file in question more closely.

Oh thanks a lot.

It’s stupid, but I just realize now I have to manage that with my software :rofl:

But it will be easy, because I made a module where is all path my binary use, I just need to change it.

So to explain, this is the implementation responsable of all used path by my software:

module ISM 
     module Default 
         module Path 
             PortsDirectory = "Ports/" 
             SettingsDirectory = "Settings/" 
             IsmDirectory = "ISM/" 
             SoftwaresDirectory = "Softwares/" 
             InstalledSoftwaresDirectory = "InstalledSoftwares/" 
             SettingsIsmDirectory = "#{SettingsDirectory}#{IsmDirectory}" 
             SettingsSoftwaresDirectory = "#{SettingsDirectory}#{SoftwaresDirectory}/" 
             LogsDirectory = "Logs/" 
             TemporaryDirectory = "tmp/ism/" 
             BuiltSoftwaresDirectory = "#{TemporaryDirectory}builtsoftwares/" 
             ToolsDirectory = "tools/" 
             SourcesDirectory = "sources/" 

Port directory: contains synchronized port, in one word some git repositories
Settings: settings files for my software (JSON files)
ISM directory: all crystal implementation for my software
Softwares directory: all software installers (crystal script used by my software with the interpreter)
Installed softwares: all recorded installed softwares (JSON files again)
Logs directory: all installation logs generated by my software
Temporary directory: where ism will download the sources and compile it (already set)

There is a last path not yet mentioned here.
When my software start a task, like install a software, it generate a file ISM.task , it’s a crystal script generated by my software.

I will have a look tomorrow about the Linux convention for the file hierarchy, but if you have any suggestions, I will be happy as well, because for some path, I’m not sure where I’m suppose to put it

Can’t help with all, because I would have to look it up myself, but:

This should go to /etc/ism/


If those are “runtime” data, meaning, it is the current state of the system and not modified by hand, /var/run/ism would be a good place.

probably /tmp/ism/ or maybe /opt/ism/build/ if you clean it up or need lots of space. /tmp/ can be small

/opt/ism/```` maybe? not sure. possibly somewhere under /usr/share/ism``` ?