Baikal needs write permission in the Specific folder - linux

I am trying to set up a test iCloud Calendar API thing, so I am trying to set it up using XAMPP on my Linux computer. After reading many forums on how to do it, I found that Baikal is the easiest way to use CalDAV. I first tried to use their Regular Package, and followed the instructions, but I keep getting the error message:
Error - Insufficient permissions on the Specific/ folder
In order to work properly, Baïkal needs to have write permissions in the Specific/ folder.
No matter how many times I do chown -R [username] Directory/to/Specific and check to make sure it worked by using ls -l Directory/to/Specific, it still gives the same error. I ended up giving up with the Regular Package and tried their Flat Package thinking it would be easier/faster since the description of the package states:
Download this package if you want Baïkal up and running quickly
I followed the Instructions again, and it still gave the same exact error as above.
Am I missing something, or is this an issue with XAMPP?

The folder Baikal has to be assigned to www-data
sudo chown -R www-data:www-data baikal/
sudo find baikal/ -type d -exec chmod 755 {} \;

I encountered this issue at Fedora 28. The culprit was SELinux, after disabling it (setenforce 0) the page came OK.

Related

Kivy-iOS toolchain wont run 'Permission Denied'

Im trying to convert a kivy app to run on iOS and have followed the information on the kivy site. However, once everything is downloaded the first step is to compile the toolchain process, which I cant do. So the command
./toolchain.py openssl kivy
returns
./toolchain.py: Permission denied
No other messages so a bit difficult to troubleshoot. I found this post. That suggestion hasn't been accepted or marked as correct, but I tried anyway and changing permissions doesn't fix the problem. I have tried
chmod a+x toolchain.py
sudo chmod 755 ./toolchain.py
sudo chmod 755 ./toolchain.py
All of which change the permissions as expected but trying to run toolchain now gives me
from: can't read /var/mail/kivy_ios.toolchain
./toolchain.py: line 4: syntax error: unexpected end of file
So changing permission doesn't seem to work either and I'm now out of ideas???
Also for info I'm running kivy in a venv on Catalina
So - it turns out after updating XCode you have to reselect the command line tools. Then it all works fine.
This answer is for future users. If any of the above answers don't work.
Use this https://pypi.org/project/kivy-ios/ and follow all the instructions

VS Code on linux, various permissions errors

Is there any way to get vs code to work properly in linux? I can't run sudo code . because that gives me an error saying it's not secure to do so, I can't do anything within the editor to force doing things, like staging a file in git, or reloading a newly installed extension. I've googled around, and it seems nobody else has posted about this, and it seems highly unlikely that I'm the first to raise issue about this. (Take it easy on me, I'm a relatively new linux user). I'm trying to figure this out on Ubuntu 18.04 if that's relevant at all. My version of vs code is 1.30.2
I guess my main question is what's the right way to get applications like vs code to be able to perform tasks that required doing things without fighting the OS about sudo and privileges?
Launch via sudo from terminal
To launch VSCode as root --which is highly discouraged-- you must specify an alternate user data directory as follows:
$ sudo code --user-data-dir /path/to/alternate/folder
VSCode will automatically generate the required folders in the selected directory and launch with root privileges.
Change permissions to fix "permission denied" error
The solution in this case is to manually change the permissions of the two directories /home/$USER/.config/Code/ and /home/$USER/.vscode/. Perform these steps:
$ sudo chmod 755 /home/$USER/.config/Code
$ sudo chmod 755 /home/$USER/.vscode
To answer your other question:
If you really need to run several commands as root and you are annoyed by having to enter your password several times (when sudo has expired), just do sudo -i and you'll become root.
If you want to run commands using pipes, use sudo sh -c "comand1 | command2".
You may also want to take a look at this Ask Ubuntu answer about running applications as root.
I solve this problem using:
sudo chown -R YOUR_USER YOUR_PROJECT/
You basically need to tell the OS that you are the owner of the files you create. Use sudo chown <user name> <projects directory>
However, if you already created some files before applying chown, don't forget to change their permission also sudo chown <user name> <projects directory>/<file name>.

Cassandra - ERROR: Doesn't have write permissions for ./../data/data directory

I just now installed Datastax Enterprise. I trying to run the commands. I am using OS X (Sierra).
cd dse/bin
./cassandra
After some process I am getting errors like this:
ERROR 02:29:11 Doesn't have write permissions for ./../data/data directory
ERROR 02:29:11 Insufficient permissions on directory ./../data/data
I saw one of the similar issue and found thier suggestion that run below commands:
sudo chown -R cassandra:cassandra /var/lib/cassandra/data
sudo chown -R cassandra:cassandra /var/lib/cassandra/commitlog
Even now I am getting other issue:
chown: cassandra: illegal group name
How did you install DSE? /var/lib/cassandra/data is typical path from an installation from packages under linux while ./../data/data/ seems to be a tarball installation (for defaults locations etc see https://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/install/dseTarLoc.html).
Your data directory is configured inside dse - you need to check the permissions there or configure your data directory in cassandra.yaml.
At least in some cases CASSANDRA_HOME is set in
bin/cassandra.in.sh
I am not sure how Cassandra gets there without CASSANDRA_HOME being set but there is no question that it can get there because the first thing cassandra.in.sh does is check if CASSANDRA_HOME is not initialized here:
if [ "x$CASSANDRA_HOME" = "x" ]; then
# CASSANDRA_HOME="`dirname "$0"`/.."
CASSANDRA_HOME=/usr/local/c4/cassandra
fi
Because cassandra.in.sh lives in bin/cassandra.in.sh this thing
"dirname "$0"/.."
forces data/data (which is important, as you will learn) to be considered in
/usr/local/c4/cassandra/bin/../data/data
To find where you put bin/cassandra.in.sh do a
sudo updatedb
locate data/data
In my case this is where I put it:
server#think:$ locate data/data
/usr/local/c4/cassandra/data/data
You can see above in the code box my solution for now is to hard code the location. I am sure I will figure out how it all works in good time. Now for the second part of your question you need to learn how Ubuntu uses group names to get that part to work. You were on the right track with:
sudo chown -R cassandra:cassandra /var/lib/cassandra/data
sudo chown -R cassandra:cassandra /var/lib/cassandra/commitlog
But you have not created the group yet, I used these instructions successfully:
https://www.admintome.com/blog/install-cassandra-on-ubuntu-18-04/
Finally, I can see from my notes I did spend a fair amount of time getting this to work correctly even if I don't understand every part of Cassandra yet. If you would like to dig in the to mysteries of CASSANDRA_HOME yourself, start with this:
sudo grep -R "CASSANDRA_HOME" /usr/

RStudio cannot reach .Rhistory on Ubuntu

I was working with markdown file on RStudio. I have Ubuntu 14.04 on my laptop. I produce html files using knitr. I decided to clean my enviroment and added rm and gc commands at the end.
Now here is a message in my console window:
Error attempting to read history from ~/.Rhistory: permission denied (is the .Rhistory file owned by root?)
What it means? Is it bad for my code?
You are right - the first time you ran it, you were in sudo mode, and the .Rhistory file was created with root as the owner. Running RStudio as root would remove the symptom, but is not ideal. To be able to run it as a regular user, simply change the owner of the .Rhistory file:
sudo chown -c <user_name> .Rhistory
In the best traditions of stackoverflow I reply to my own question! The problem occurred because when I first started R, I did it as su:
sudo R
so I can load a lot of useful libraries in /usr/lib/R/site-library and not in my account. As result .Rhistory became su file. It is possible for RStudio to see it if it is started as
sudo rstudio
and then all is fine.

pid file disappears after starting pgpool with ubuntu and postgresql

I´ve installed postgresql 9.1 on ubuntu 12.04 with pgpoolII-3.3.3 and pgPoolAdmin
If I try to run pgpool from a terminal with sudo pgpool it seems to start. Viewing ubuntu file explorer I can see how a pgpool.pid file is created at /var/run/pgpool/pgpool.id (this is the path in pgpool.conf)
But after one second the file disappears.
I have tried to change the owner of the directory and the directory permissions but nothing seems to fix it.
If after that I try to stop pgpool wiht sudo pgpool -m fast stop I got an error: Error. pid file not found
It seems like the file is created and suddenly destroyed. I´m wondering why.
If I try to run pgpool from pgPoolAdmin I got this error: pgpool start failed. pgpool.pid not found.
Like other times, it´s maybe and stupid issue and I´m not being able to solve it as i don´t have a high level of knowledge on those systems.
Any idea about what to try?
Xrry Christmas
Solved. I think the problem was caused by a permission problem. After trying
sudo mkdir /var/run/pgpool
sudo chmod 777 /var/run/pgpool
sudo chown postgres/postgres /var/run/pgpool
sudo postgresql service restart
It seems to be working now.
check the tmp directory using ls -la command and delete the file .s.PGSQL.9999 and .s.PGSQL.9898 and restart the server
Upon configuring PgPool-II, I found some documentation explaining that using the default directory /var/run/pgpool for the PID file was a bad idea, for that file could be erased when the service reboots.
The contents of the /var/run directory (including the pgpool
directory) may be removed by the operating system during a reboot. The
/var/run/pgpool directory should NOT be used as the location for the
pgpool.pid file.
The issue seems to occur when using Ubuntu.
So a possible solution would be to store the PID file in a directory named so as to not match the name of a service that could be rebooted. For instance, you could change the pgpool.conf file :
pid_file_name = '/var/run/pgpool4ever/pgpool.pid'
I could not try it on my own as I do not use Ubuntu, but maybe this could help someone facing a similar problem. Although I am not sure that it is very wise to go past basic Ubuntu way of working....

Resources