0

In my Visual Studio code on ubuntu 19.04 I have created a folder with some content with a CLI tool called expo. However, my sudo user jonas does not seem to have rights to write to this folder since I have to verify password every save. Which is extremely daunting.

I have already tried the answer of

How can I give full permission to folder and subfolder

sudo mkdir /var/szDirectoryName
sudo chmod a+rwx /var/szDirectoryName

This is the output in the terminal

jonas@jonas:~/Projects/javascript-questions-flow3$ sudo chmod a+rwx /home/jonas/Projects/javascript-questions-flow3/react-native-flow-3
jonas@jonas:~/Projects/javascript-questions-flow3$ ls -l
total 140
drwxr-xr-x   4 jonas jonas   4096 jun 10 11:36 backend
drwxrwxr-x 246 jonas jonas  12288 jun 10 23:19 node_modules
-rw-rw-r--   1 jonas jonas   1216 jun 10 23:19 package.json
-rw-r--r--   1 jonas jonas 103310 jun 10 23:19 package-lock.json
drwxrwxrwx   6 jonas root    4096 jun 11 01:07 react-native-flow-3
-rw-rw-r--   1 jonas jonas   9586 jun 10 16:40 README.md
jonas@jonas:~/Projects/javascript-questions-flow3$ 

I expected the rootin react-native-flow-3 to change to my user as the rest. How can I give jonas sudo write access to this folder?

1

check the rights of the files you want to access in react-native-flow-3

ls -l /Projects/javascript-questions-flow3/react-native-flow-3

who owns the files?

May be you need to add jonas to the group root too.

usermod -a -G root jonas

And why dont you change react-native-flow-3 from root to jonas?

chown jonas.jonas react-native-flow-3

May be you should got through this tutorial https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.