I'm trying to install LXD on my Ubuntu via this tutorial https://docs.conjure-up.io/devel/en/user-manual#users-of-lxd in it says I have to follow these steps:
sudo snap install lxd (no problem in installing)
/snap/bin/lxd init (I get the below error)
Error: Failed to connect to local LXD: Get http://unix.socket/1.0:
dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission
denied
can anyone tell me how to fix it?
Looks like for some reason the permissions on the unix.socket are not correct. (I tried this myself and works fine). The permission on my unix.socket look like this:
srw-rw---- 1 root lxd 0 Nov 7 18:02 unix.socket
I would try:
sudo chown root:lxd /var/snap/lxd/common/lxd/unix.socket
sudo chmod 664 /var/snap/lxd/common/lxd/unix.socket
sudo chmod u+s /var/snap/lxd/common/lxd/unix.socket
If not then it could be an issue with your /var/snap/lxd/common/lxd/ directory. Does it even exist?
Proper way according to Ubuntu page is:
sudo apt install lxd
sudo lxd init
sudo adduser <your-user> lxd
newgrp lxd
Now you are ready to launch:
lxc launch ubuntu:22.04 test
Related
I have a Ubuntu server running nginx and laravel. I recently had to run a composer update –no-dev and composer-autodump –o. Now I’m getting the error message below when I login.
file_put_contents(/var/www/laravel/storage/framework/cache/data/45/0d/450dd23cd0918654a4bed8a88426d460115cac32): failed to open stream: Permission denied
I reran the command below
sudo chmod -R 777 storage/framework/cache/*
sudo chmod -R 777 storage/*
and I’m still getting the error on initial login. I reload the page after several attempts and it takes me to where I’m trying to go. Does anyone know why this is? Thank you for your help
Is there another command I need to run for the permissions... Thanks
I was able to find the answer from the original guide used.
sudo chmod -R 775 /var/www/laravel/bootstrap/cache
Solution 1:
sudo vi /etc/php/7.2/fpm/pool.d/www.conf
change:
user = www-data
group = www-data
to:
user = vagrant
group = vagrant
Solution 2:
modify Vagrantfile
config.vm.synced_folder ".", "/vagrant/",owner: "www-data", group: "www-data"
owner/group set to www-data, not vagrant
I am trying to install Testlink on OS X for Mac. However, I am getting the following message which will not let me continue with installation. I have seen solutions for other operating systems but not for Mac. I am inexperienced with Mac. Any help appreciated. Thanks!
I resolved it..
chmod 777 /Applications/XAMPP/xamppfiles/htdocs/testlink-1.9.16/gui/templates_c
sudo mkdir /var/testlink/logs/
sudo mkdir /var/testlink/upload_area/
Then give the last two directories writeable permissions:
sudo chmod 777 /var/testlink/logs/
sudo chmod 777 /var/testlink/upload_area/
Check whether the /var/www/html/testlink/gui/templates_c directory is writable (logged with the user used to run the webserver process).
To resolve this issue try to follow steps:
ssh into the machine you are installing
move to the testlink main directory, in my case: cd /var/www/html/testlink/gui
change the permision of templates_c: sudo chmod a+w templates_c
Now try to install testlink again.
I just downloaded mongodb via homebrew. When I tried starting it by mongod it said that I didn't have the data/db folder for it. I made the folder via sudo command from another stackoverflow page. Now the error that I'm getting is:
exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
I'm not sure why it's asking me if another instance of mongod is running because I only have one bash shell open.
Any tips would be awesome. Thank you!
Okay, I figured it out. The command after sudo mkdir -p /data/db is
sudo chown $USER /data/db
I just setup a vagrant box using laravel/homestead on Mac OS 10.9. I get the following error after I connect via SSH:
-bash: /home/vagrant/.bash_aliases: Permission denied
Haven't seen this when I provisioned on my Windows setup. What could be causing it?
To fix this I just did the following, though I can't figure why this was necessary to begin with:
sudo chown $USER:$USER ~/.bash_aliases
I recently installed Arch Linux on my Raspberry Pi and, after logging in as root and creating myself a user account I tried to use the sudo command. This was the result:
[phillipus#alarmpi home]$ sudo mkdir Public
bash: sudo: command not found
After searching for the problem, I logged in as root and executed pacman -S sudo. This was followed by a long output and a confirmation of installation. Following this, I retried to use sudo both as root and as my user, both times getting the same response. Following another solution to the problem, I tried to add myself to /etc/sudoers, only to find out that it didn't exist.
I am not very experienced with Linux, so could you please try to explain your responses fully?
First, you need to install the sudo package to use sudo:
pacman -S sudo
After that, you need to edit the sudoers file and add your username to it.
You can add yor user to the wheel group using usermod -G wheel yourusername and uncomment the %wheel ALL=(ALL) ALLline in the sudoers file. For more information, have a look at Sudo - ArchWiki