Odoo server restart eror - postgresql

I have created a model now I am using this command to restart the module
but it is showing this error
using this command to restart module
odoo start --config=/etc/odoo/odoo.conf -i HelloModule
the error is
odoo: error: The config file '/etc/odoo/odoo.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to generate it
the screenshot of the file which error shows that it is not available

Try adding readable permission to config file by chmod command
sudo chmod +r etc/odoo/odoo.conf
Check this link to know more about modifying file permissions.

Related

Bun Not Found After Running Installation Script

I have ran the installation script by pasting this code:
$ curl https://bun.sh/install | bash
However, when I try to get the version of bun, it says it could not find it:
$ bun --version
Command 'bun' not found, did you mean:
command 'ben' from deb ben (0.9.0ubuntu2)
command 'bus' from deb atm-tools (1:2.5.1-4)
command 'zun' from deb python3-zunclient (4.0.0-0ubuntu1)
Try: sudo apt install <deb name>
I had the same issue running on Windows 10 WSL2 Ubuntu-22.04 with Bun v0.1.5.
The solution (and more detail just in case anyone needs it) below:
The executable for bun is in the directory "/home/username/.bun". You need to add this to your $PATH so that this can be found when typing bun commands such as "bun --help".
The bun setup process does not add this path so you need to do it yourself.
Two ways to do this :
(1) Manual method
Type in the terminal:
export BUN_INSTALL="/home/YOUR_USERNAME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Replacing YOUR_USERNAME with your real username (the current username can be found by typing 'whoami' in the terminal).
Note: This process will have to be REPEATED for every new shell you open.
(2) Automatic method
Edit the .bashrc file :
nano ~/.bashrc
at the end of this file add
BUN_INSTALL="/home/YOUR_USERNAME/.bun"
PATH="$BUN_INSTALL/bin:$PATH"
Replacing YOUR_USERNAME with your real username (the current username can be found by typing 'whoami' in the terminal).
(Remember to save your changes with Ctrl-O)
Note: You will NEED TO OPEN A NEW SHELL for this to work OR type 'source ~/.bashrc' to use in the current terminal.
You should now be able to run bun commands in any new shell.
The installation script says a message at the end telling you how to add bun to your PATH manually. Here is that output:
Manually add the directory to your $HOME/.bashrc (or similar)
BUN_INSTALL="/home/sno2/.bun"
PATH="$BUN_INSTALL/bin:$PATH"
I advise you re-run the installation command and copy the environment variables and add them to your PATH.
export BUN_INSTALL="/Users/manendra/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
add these to your .bashrc, .zshrc or you can use export command to use for current session.
Note: Change your username place of (manendra) "/Users/manendra/.bun"
Manually add the directory to ~/.bashrc (or similar):
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
From the installer, last message is:
To get started, run
exec /bin/zsh
bun --help

Permission to read the directory contents is required for each directory up the hierarchy - GitHub runner

when I run command./config.sh --- while trying to setup GitHub runner on server I get this error
An error occurred: Permission to read the directory contents is required for '/var/www/usr/data/actions-runner' and each directory up the hierarchy. Access to the path '/var/www' is denied.
folder /var/www/ is owned by root, and usr running /.configure command has proper rights on /usr/data/action-runner
I tried running above command after adding "usr" to sudo then it tells me command must not run as sudo. So there is no winning here. I personally do not want to run command as sudo so I didn't try to figure out this error.
But, burning question I have is why does this configure script cares if it has read permission on /var/www/
This kind of does not addup
You can run sudo chmod 0755 /var/www, which fixed the problem for me

Nagios Error : /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

I am trying to install nagios-plugins-2.2.1 on redhat machine
when running this command:
Nagios /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
i am getting the error as
no such file or directory
pls help
https://www.youtube.com/watch?v=VsIrAsXzbx4
It looks like the nagios binary is located in another location not in /usr/local/nagios/bin/nagios
To find where it is run:
which nagios
If nagios was installed using the RHEL package manager so it will be usually in:
/usr/sbin/nagios
If it did not come back with result just type the first 3 letters "nag" then type the "Tab" key and it will complete it.
Once you find it then use it instead of /usr/local/nagios/bin/nagios
Then make sure you get the right nagios.cfg file location by running the 2 following commands:
updatedb
locate nagios.cfg
If when you run updatedb you got "Command not found" error message then mlocate package is not installed and you can get the nagios.cfg location by running this command instead
find / -xdev -type f -name "nagios.cfg"
So by that you should have both "nagios binary" and "nagios.cfg file", you can then re-run the command with the right file paths
It looks like "nagios.cfg" does not exist.
Try to create it and configuring it manually.
Then try again.
You can try to look at where your nagios.cfg file has been created, using
locate nagios.cfg
for instance, to make sure your file is in the right path and maybe call that newly displayed path instead.
/usr/local/nagios/bin/nagios -v [path_of_nagios_cfg]
Also you need to omit the first "Nagios" from the command line as it is in Capital N which sure is supposed to come back with "no such file or directory" message
The command should only be like this:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
you will find nagios.cfg file in #/usr/local/nagios/etc
then run that command giving this path.

Snort Errors: ERROR: /etc/snort/snort.conf(0) Unable to open rules file "/etc/snort/snort.conf": No such file or directory

First time Snort user and running into two issues. After installation on a Windows 10 machine, I am able to initialize snort via an elevated command prompt: snort -A console. While snort it running however I noticed "Warning: No Preprocessors configured for policy 0." mixed into the console output.
A quick Stackoverflow search pointed me to run the following command to solve this, they said: This message indicates that no snort preprocessor is loaded. In order to get rid of this warning, please use the command: snort -v -c /etc/snort/snort.conf
But when I run this command I am greeted with another error:
Running in IDS mode
--== Initializing Snort ==--
Initializing Output Plugins!
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file "/etc/snort/snort.conf"
ERROR: /etc/snort/snort.conf(0) Unable to open rules file "/etc/snort/snort.conf": No such file or directory.
Fatal Error, Quitting..
This is where I get lost since that's where I have the config file (initally it was just /etc/snort.conf, but created a snort folder so the directory / file exists).
If anyone has any insight into this I would be more than grateful!
Make sure the file snort.conf has necessary permission and ownership. The directory /etc/snort should contain "chmod -R 5775" level permission. If you are installing it from source, you would be always able to copy the snort.conf to /etc/snort.

Can't uninstall brew postgres

I am trying to run brew uninstall postgres but I am getting these errors:
I used to have postgres.app and the enterprise install too.
Contents brew uninstall postgres
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error: The current working directory doesn't exist, cannot proceed.
Probably you are running that command from a directory that doesn't exist (or no longer named the wait it appears on the terminal) anymore. Why don't you try cd . or cd "$PWD" again and trying to run the command once again.
you are running the command in a directory that doesn’t exist, close the terminal and re-open it, or just restart your macOs. Never remove any directory before you restart OS.