Xcode Project read only solution - xcode

My Xcode project unfortunately changed to read only state, nothing is going to be modified. i cant able to forward. help me to change my Xcode status from read only to read/write.
help me to fix it.
thanks in advance.

go to the Terminal and change it:
cd PATH #where PATH is the directory where you project is
sudo chown -R YOURUSER:staff .
sudo chmod -R 775 .
Thant will reset all permission to writable for you, readonly for others

Related

VScode unable to save files inside my WSL2 home folder

I'm trying to make WSL2 work for my web projects development and this is driving me crazy!
Basically, i have two options.
1. Save my project files into c drive and access those with WSL (which makes the responses extremelly slow)
2. save my project files into /home/ which makes the project run super smooth, but i'm unable to edit those files with VSCode.
The error that is what follows:
Failed to save 'DefaultSeeder.php': Unable to write file 'vscode-remote://wsl+ubuntu-20.04/home/lucas/Projetos/API/src/database/seeds/DefaultSeeder.php' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/home/lucas/Projetos/API/src/database/seeds/DefaultSeeder.php')
Here is another command to provide your user with sufficient permissions to write to files:
sudo chown -R myuser /path/to/folder
From https://github.com/microsoft/vscode-remote-release/issues/1008
Well, turns out I was being stupid and posted a stupid question.
After many hours trying to make this damn thing work, I was able to do so, by setting the ownership of the folder to my user.
Here is the shell snippet to change the ownership to the current logged in user:
$ sudo find /~~folder-path~~/ -type d -user root -exec sudo chown -R $USER: {} +~
This solved it for me
sudo find /home/ -type d -user root -exec sudo chown -R $USER: {} \;
I had the same problem and spent hours to find this working solution.
For me, it seems to be right one because it doesn't produce problems with 1. too generous file permissions sent to git afterwards and 2. change ubuntu config to fit windows environment (coupling to windows user).
I found the source of this solution on github. Thanks to saltazaur!
https://github.com/microsoft/WSL/issues/4260#issuecomment-729594527
Steps to solve the problem:
Reset (or reinstall) the Ubuntu distro via Windows "Programs and Features"
Note: If you have data in your home directory already, copy it to windows before
Open Ubuntu & follow initial setup (create user)
Add file "/etc/wsl.conf" with:
cd /etc
sudo touch wsl.conf
sudo nano wsl.conf
copy and paste the content from microsoft docs
save with CTRL+X > "Y" > ENTER
restart wsl (or windows, to be sure ;))
At next startup of ubuntu, the settings in wsl.conf will be applied.
The important part in this case is the following line:
options = "metadata,umask=22,fmask=11"
It sets, that all newly created files will use umask 22 (chmod 775) and fmask 11 (chmod 644)
This settings also applies for IDEs like VSCode & PHPStorm.
Happy coding - finally! ^^
In my case, I cannot edit/delete any file directly by File Explorer too, not just VSCode.
After opening Ubuntu 22.04.1 LTS on Windows, run
sudo chown -R my_username my_folder
Note the my_username is the username in the Ubuntu.
This solves my issue.
I've managed to solve this issue as follows:
"Run as administrator" the VS Code
and then open folder -> locate the working folder.
It worked fine for me.

Editing the file "config.inc.php"

I put my password into he config.inc.php file because I couldn’t access phpmyadmin in xampp server. But after editing the file, I can' save it.
Error
"You do not have the permissions necessary to save the file. Please
check that you typed the location correctly and try again."
how can i get rid of this?
Please Open Same File With Sudo Permission
Go to that perticular Directory via terminal
after that edit file by
sudo nano config.inc.php
or just
sudo nano /etc/phpmyadmin/config.inc.php
Enter Password
You might wanna go through this. This might be the solution you are looking for.
http://blog.elijaa.org/index.php?post/2013/02/19/Solve-Wrong-permissions-on-configuration-file%2C-should-not-be-world-writable!-error-on-phpMyAdmin
$ cd /opt/lampp/htdocs/myapp
$ chown bitnami.root config/myapp.php

How to set permissions of certain folders to 777 on Mac

I need to set the permissions of just 3 specific folders (on my Mac) to 777
I went to CMND+i (get info) but the folder permissions seemed to be Read and Write - but this didn't seem to fix it.
I am trying to work out how to do this, because I am using MAMP on my Mac to try and run a localhost server to test a website. Reason; I am trying to run the script of a PHP website. It is asking me to change the permissions of certain folders in order to proceed with the 'install'.
I think the closest match to a possible answer is here:
Java: Create a new dir with 777 permissions on Mac
But, this appears to be Java. I assume that I need to be able to do this via either MAMP or Terminal. If anyone could please advise me which program/tool to use and what to type in, I'd be very grateful.
Thanks
I know how to do it in a terminal, to create "/some/directory/some/where" you can use -
# EDIT: 777 not 077.
mkdir -p /some/directory/some/where && chmod 777 /some/directory/some/where

Laravel 4 permissions not showing

Im getting blank page while using Laravel, I already gave perms to the folder with
find app/storage -type d -exec chmod 777 {} \;
But still blank page.
Another thing you can try...
run php artisan serve from your projects root dir, and see if the browser comes up if you go to http://localhost:8000
And give us feedback in the run... because now we only can guess.
I don't know where you're at on solving this problem. But, you'll want your permissions to be at 775 not 777. Also, you may want to check ownership on your htdocs folder and all files within that directory. This is pure speculation since I don't know what kind of dev enviroment you're using, but i run a lamp stack and when ever I have to create a new enviroment the htdocs folder is always owned by root. You may want/need to chown that to your user account.
How about chmod -R 777 app/storage
If that does not work it is a htaccess problem propably
Last but not least, and it might sound stupid, but can you verify if the directories are all there in app/storage ? Because it happened to me that i was checking out from svn and empty directories are not transferred, so make sure you check that app/storage/logs exists.
If there is no log file written then it sure has to do with access levels, for example not being able to write into those dirs, hence the chmod command above. And i posted that because i had never seen anybody do it the way you did.
At least if you are able to write to the log file you can find out what exactly is wrong.
But we have so minimal information it is hard to help you in a good way.

Terminal issue my desktop has permission -rwxr-xr-x

So I did a command
sudo cp myfile /Desktop
my file was an executable and It changed my desktop to be an executable I need to reset to be a directory with permissions drwxrwxr-x+
Can someone please help Thanks
I think the correct command to change permissions on a file/folder is chmod or you could reset to default using umask (but I'm not sure about how to use this as well)

Resources