I came across Cockpit CMS UserFlood Addon via GitHub and I would like to install it on my Fedora Server 35.
Is there a simple way to install/configure it on my Fedora Server? I see instructions on the GitHub repository but I am a bit new to this particular install.
Never mind, I did not figure it out. I have a few questions:
Composer tells me to not run it as root, so I do not. This leaves me with questions about the installation.
Do I install git clone https://github.com/pauloamgomes/CockpitCMS-UserFlood.git ./addons/UserFlood in the root folder or do I create a path in my sudo user profile user_name/cockpit/addons?
If I install the rep in the root folder /etc/cockpit/ I cannot run composer since it does not have superuser privileges and I get permission denied. This makes me believe I need to create a cockpit path for the addon in my user account, but will the addon be systemwide or just for me?
If it is not systemwide in relation to question 2, how would I make it systemwide?
It will not read the addon location with composer require auloamgomes/cockpitcms-userflood if it is in the root path for Cockpit but it will when it is in my user path.
I have probably answered my questions in that it is supposed to be created in my user’s path and not the root unless it is fine to run composer as root.
UPDATE
I put the UserFlood folder in the root cockpit path /etc/cockpit/addons/UserFlood and then I created my project file in my user path because no matter where I put my project there always seemed to be a schema error:
./composer.json" does not match the expected JSON schema: - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$
Even when I changed the name to every possible location the schema error persisted. So I put the project folder in my user path location user_name/project. I then was able to run composer require pauloamgomes/cockpitcms-userflood but then I would get the following message:
Could not find a matching version of package pauloamgomes/cockpitcms-userflood. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
So I went into the UserFlood folder and edited the name in the composer.json file. I changed it from pauloamgomes/cockpitcms-userflood to pauloamgomes/cockpit-cms-userflood (added dash after cockpit) and then it compiled everything without isues using composer require pauloamgomes/cockpit-cms-userflood.
Is this a bug? I am not sure if changing that name for UserFlood is going to mess anything up. Since I have it set up, will it work systemwide or do I need to set it up with each account?
So I figured out how to do it on the root path /etc/cockpit/addons. I had to chmod and chown my way around.
However, it is not working. I am not sure if it is because Cockpit is on the internal zone of Firewalld and a few IPs are added as sources, which denies anyone without that IP to reach our Cockpit or not but I just would like the extra security just in case some spoofing is happening.
I am giving up on it for now. I cannot seem to get it to work whether it is in the root path or user path.