You are not logged in.
Pages: 1
Hey. How to give permission for VSC to make it able to save files? When I try to save anything I've got this error:
Unable to write file (NoPermissions (FileSystemError:) Error: EACESS: permission denied, open '/home/user/Desktop/Programs/Untitled-1')
Offline
That's weird. What is output of commands:
ls -l /home/user/Desktop/Programs/
ls -ld /home/user/Desktop/Programs/
lsattr /home/user/Desktop/Programs/
I assume you trying this as 'user'.
Offline
That's weird. What is output of commands:
ls -l /home/user/Desktop/Programs/ ls -ld /home/user/Desktop/Programs/ lsattr /home/user/Desktop/Programs/
I assume you trying this as 'user'.
When I try run it as root it's showing that it's not good idea to run it as super user. (
You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument
)
ls -l shows: total 0
ls -ld shows: drwxr-xr-x 2 root root 4096 Nov 8 19:55 /home/user/Desktop/Programs
lsattr shows: nothing
Last edited by Anonymous-User (2019-11-09 10:14:09)
Offline
So now it's everything clear. You have to run VSC as normal user (user), not as root (unless you run as root with parameter 'code --user-data-dir /root' from terminal every time when run as root).
But first, to run as ordinary 'user', you have to change of ownership to program directory by command (as root or with sudo):
chown user:user /home/user/Desktop/Programs/
By the way why do you run VSC as root? It is not good to run programs as admin (root) and work as admin user unless it is needed.
And it looks like you don't know much about permissions and groups. Write in terminal and read 'man chmod' and 'man chown'. Press h for help when reading manual (man).
It was simple, so you better start learning, reading documentation or you will have trouble.
Last edited by xerxes_ (2019-11-09 11:12:52)
Offline
So now it's everything clear. You have to run VSC as normal user (user), not as root (unless you run as root with parameter 'code --user-data-dir /root' from terminal every time when run as root).
But first, to run as ordinary 'user', you have to change of ownership to program directory by command (as root or with sudo):
chown user:user /home/user/Desktop/Programs/
By the way why do you run VSC as root? It is not good to run programs as admin (root) and work as admin user unless it is needed.
And it looks like you don't know much about permissions and groups. Write in terminal and read 'man chmod' and 'man chown'. Press h for help when reading manual (man).
It was simple, so you better start learning, reading documentation or you will have trouble.
When I type:
chown user:user /home/user/Desktop/Programs/
It's showing
chown: invalid user: 'user:user'
My username is alu when I try to type
chown alu:user /home/user/Desktop/Programs/
it's showing same error. It's only working when I type
chown alu:root ...
but when I type
chown alu:user ...
it's showing this error
chown: invalid user: 'alu:user'
Last edited by Anonymous-User (2019-11-09 11:22:49)
Offline
You need to set the username and groupname to the one of your user.
id -un # username
id -gn # groupname
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Online
You need to set the username and groupname to the one of your user.
id -un # username id -gn # groupname
Thank you. It worked.
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline
Pages: 1