Laravel Homestead permission denied to .bash_aliases - laravel

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

Related

Permission denied when installing pwndbg

I was setting up my Kali Linux recently. I was trying to install debuggers (pwndbg, gef, peda) using the following script: https://github.com/apogiatzis/gdb-peda-pwndbg-gef
After the setup I was testing the functions, and I cannot open any of the debbugers, the permissions are denied.
What can I do to solve the issue? Thanks!
I have tried to follow the instructions in this post first: https://infosecwriteups.com/pwndbg-gef-peda-one-for-all-and-all-for-one-714d71bf36b8, but I got no permission
I used the code instead, but it didn't work too. Source: https://github.com/apogiatzis/gdb-peda-pwndbg-gef
I tried to use sudo function but it didn't work, as well as when I was trying in root
sudo chmod +x /usr/bin/gdb-*
I tried to use chattr, but another error occurs.
$lsattr /usr/bin/gdb-pwndbg
-----------e-------- /usr/bin/gdb-pwndbg/gdb-pwndbg
$chattr -e /usr/bin/gdb-pwndbg
chattr: Operation not permitted while setting flags on /usr/bin/gdb-pwndbg/gdb-pwndbg

zsh: permission denied: reading anyway

this is the error its showing now
I was installing "Laravel" through a tutorial and now i am facing this error "zsh: locking failed for /users/vishnu.zsh_history: permission denied: reading anyway"
macos:- catalina v10.15
I am using macbook air,
I don't have any idea what happened it happened while I was installing composer and a file was missing to get that file I ran some "chown" command and now I cant even open my chrome browser
Please Help
-ThankYou
You can run this command :
sudo chown -R ${LOGNAME}:staff $HOME
to make sure the owner is correct for your files.

permission denied on installing lxd via snap

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

Nginx Laravel Ubuntu Server Composer Update Changed permissions/Not staying

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

Permission denied in mac terminal

I'm trying to write a command on mac terminal using the root, but it shows me that the permission denied, when I use the sudo it shows that the command not found
can any one please help me
aftheers-MacBook-Air:scripts root# ./ArduinoWifiShield_upgrade.sh
-sh: ./ArduinoWifiShield_upgrade.sh: Permission denied
You have to make the file executable:
chmod +x ArduinoWifiShield_upgrade.sh
To avoid permission denied prompt, type this command and continue
sudo su
Install the packages in this admin mode,
then go back to normal mode
exit

Resources