i see /run is a mounted as a tmp file system. How do I control it and set it up?
I can't find anywhere with is set up to constructed
It's controlled by openrc, /etc/init.d/bootmisc.
/etc/init.d/bootmisc.
really, I looked at that
* bootmisc: unknown function `/run'
[ruben@flatbush ~]$ sudo vim /etc/init.d/bootmisc
[ruben@flatbush ~]$ sudo /etc/init.d/bootmisc restart
[sudo] password for ruben:
* WARNING: you are stopping a boot service
* Caching service dependencies ... [ ok ]
x => /var/log
x => /tmp
x => /var/lib/misc
* Creating user login records ... [ ok ]
* Wiping /tmp directory ...
look like not run...
the package builders must know.
grep -ir tmpfs /usr/lib/openrc/*
/usr/lib/openrc/sh/init.sh: mount -t tmpfs -o mode=0755,nodev,size=10% tmpfs /run
Seems hardcoded and not controlled by a config file.
I thought I tried that :( - thanks
May I ask why you want to change it?
/run is supposed to be tmpfs because /run needs to be deleted on shutdown/reboot. This is by design and follows the FHS(Filesystem Hierarchy Standard).
What I want it to do is stop populating directories with the wrong permisions
specificially, I want it to stop making /run/mysql and make /run/mariadb with maria.mariadb ownership
I also want it to stop adding mysql as a user in /etc/passwd and /etc/groups etc.
Nothing to do with /run.
You need to modify the mariadb package to make those changes.
/usr/lib64/tmpfiles.d/
The mariadb package is also adding users to /etc/passwd on ever reboot?
Yes, the mariadb package controls that. It adds a file /usr/lib/tmpfiles.d/mariadb.conf, this file creates the user and group "mysql" on every boot.
Perfect!!! Thanks for that information!
Is this also where the /run files are created so I can create /run/mariadb/ on boot?
or another file or hard coded into grub?
Files in /run are usually made by rc software or by services such as mysql. I don't get why you are doing all this to change the word mysql to mariadb. Mariadb is a mysql drop-in replacement which is why everything ia called mysql, it is like that on purpose to be fully compatible when other software depends on mysql. By doing what you are trying to accomplish you break compatability.
It doesn't matter WHY I do it, cough cough trademaks cough cough oracle cough cough because understaning the system is a good enough reason, cough cough, I test both mysql and mariadb on the same boxes cough cough...
The important thing here is to userstand how the system works and creates tmp enties under /run
What is rc software? You can't just write it into the file system on installing the package, obviously since it is a temp file and is not permanent. When the system boots it creates new /run entries and does so from some configuration file or setting. Are you saying they are created by the /etc/rc.d file? That is not the case. I have entries for software that doesn't exist any longer, like dovecott.
The point of the whole run system was to allow for secure entries for temp files for deamons what are under the lowest file permisions and are volitile. The system needs to produce subdirectories under /run with proper file permisions upon boot in order to do this.
A quick google search for "what is rc software linux" leads to this:
https://unix.stackexchange.com/questions/111611/what-does-the-rc-stand-for-in-etc-rc-d/111613
Some major rc softwares:
OpenRC
runit
s6
svinit
upstart
systemd :o
Many of these actually have two purposes, some of these are both an init and a rc software. But for example old versions of OpenRC are only RC and required svinit to handle init functionality.
we doesn't to stack exchange. We use usenet sometimes. Other sources are OS mailing lists, project mailing lists, project forums, irc channels, moderated academic lists... never ever stack exchange.
If a deameon needs multipe tmp files, lets say it needs several sockets, and perhaps a Semiphore and a pid file, and it needs to touch everythign under
/run/mydaemon/ where mydaemon is owned by root and group mydaemon with a rwx, r-x, --- permisions, a /etc/rc.d file can't, I think, make this mydameon directory.... It has to be done by a root enabled process, preferably init ?
Chris - I haven't had to read this for a while, but I just referred to it again. I want to thank you for all the basic help again!
Also thank you for the patience! Dealing with people seemingly blind is not easy.
What exactly is the difference between a rc - run command, and in init functionality...
I thought they were the same.