-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to access Documents/Downloads/Desktop folders on MacOS when running brew services start code-server #2794
Comments
For debugging purposes, what happens when you run code-server as root/sudo? |
This comment has been minimized.
This comment has been minimized.
Okay, so doing more experimentation: Running Looks like this only happens when running |
Glad to hear @bpmct's suggestion resolved the issue! Thanks for the extra info. We'll investigate further. |
Sorry for the confusion on my part! You said We'll definitely look more into this when we have time! |
Newer versions of macOS require permission through a non-UNIX mechanism for access to the Desktop, Documents, Pictures, Downloads, and other folders. You may have to give Node "full disk access" since it doesn't implement any of the macOS permission request stuff natively.
➜ ~ which node
/usr/local/bin/node
Open System Preferences > Security & Privacy > Privacy (horizontal) tab > Full Disk Access (vertical) tab > Click the 🔒 to unlock > Click + and select the Node binary you located. |
I created a PR that documents this in our FAQ. Should we leave this issue open or is this something beyond code-server's control that should be closed? |
Well, it seems doesn't work for me... Another thing is that while executing To solve the permission issue, I edited the code-server's plist file created by
the 'fdautil' file is provided by an app called 'LaunchControl', which is also needed to granted with Full Disk Access permission previosly. I've also added the path for Tex in this plist file, and launch code-server by zsh. This one does work but not elegant at all, hopefully there could be a solution for original service management by homebrew. |
There is - hurrah!! The file you'd want to change is located here. I'm running short on time at the moment or I'd submit a PR myself. |
Aha! It looks exactly the config file to generate plist file which should be edited (although I have no idea how to edit it permanently). In my previous trying, I duplicated the plist file made by homebrew (then stop using homebrew to manage this service) and edit it directly with the content above. Well, I still have some trouble dealing with the environment varible. To solve the absence of path to TeX directory, I added the And ... sadly grant Full Disk Access permission for Node can't solve the problem accessing Document folder. I don't know if this is my own problem or some other files should alse be granted permission? |
I found an answer said:
It seems that the application itself (code-server) but not node should be granted access to full disk. If code-server is launched in Terminal, the folder access permission is fine since most people have already granted terminal's access to Document/Desktop etc. But I took a look to the binary file Conclution:
(I tried to add
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
code-server --version
: 3.9.2code-server
cannot view or edit any files in the Desktop, Documents, or Downloads folders, even after granting Terminal full disk privileges. There's no error, the folders just appear as empty. I can create files/folders throughcode-server
in those locations, but any new file created there instantly disappears fromcode-server
, while still being visible in Finder.The text was updated successfully, but these errors were encountered: