Skip to content
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

Item ${projectName} already exists #693

Closed
medusar opened this issue Mar 12, 2016 · 10 comments
Closed

Item ${projectName} already exists #693

medusar opened this issue Mar 12, 2016 · 10 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs. status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it.

Comments

@medusar
Copy link

medusar commented Mar 12, 2016

each time when i try to created a project, it tells me "Item ${projectName} already exists" , really difficult to use!!!

@medusar
Copy link
Author

medusar commented Mar 12, 2016

look at this

no matter what project name i change to , it does not work~

@ghost
Copy link

ghost commented Mar 12, 2016

What is your local UID? If you run Che as root or your UID is not 1000, this issue occurs.

@medusar
Copy link
Author

medusar commented Mar 13, 2016

wow,thank you so much for replying me, yes ,that's right ,i was running Che as root, but, how to solve this problem if i really need to run Che was root?

@ghost ghost added status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. kind/question Questions that haven't been identified as being feature requests or bugs. labels Mar 13, 2016
@TylerJewell
Copy link

@eivantsov Can you elaborate more about why Che cannot run as root? I was aware that Che must run as UID 1000, but surprised about the root issue.

@medusar The reason that Che requires UID 1000 is that this UID is passed along into the workspaces that are created by Che itself. Che creates workspaces as Docker containers. Inside those Docker containers, they inherit certain properties from the Che system. And in order for users in the workspace to have proper write permissions, we have to pass along a UID of 1000 from Che to inside of the container itself.

So that is the UID part. I was just surprised by the root requirement so interested to hear Eugene's description of the circumstances.

@ghost
Copy link

ghost commented Mar 13, 2016

Che can be run as a root, but as a result there's a permission issue. We mount a local directory into /projects inside a container and local permissions are inherited. If a local dir is owned by root, /projects inside a container will be owned by root as well. A user in the container has UID 1000, thus there are problems with writing to /projects directory.

@TylerJewell
Copy link

Ahh, thank you that is quite clear. So let me restate in my own words.

  1. If Che is run as root, then the project files inside of the workspace are owned by root as well.
  2. However, when the workspace is launched, the user in the container as UID = 1000.
  3. So the user in the container will have insufficient permissions to write to the files - the user will need root privileges.

Question - is there a way for Che to give the user root permissions? Is there a way to grant sudo rights when we first create the workspace?

@ghost
Copy link

ghost commented Mar 13, 2016

Theoretically, we may grab UID of a current local user and run chown on projects dir in the container.

@medusar after you have started the workspace, run sudo chown -R user:user /projects in Consoles - Terminal

This will fix the problems. Sure, it's a workaround.

@TylerJewell
Copy link

Would this be something we could inject into our base Dockerfiles?

@ghost
Copy link

ghost commented Mar 14, 2016

Local folder permissions stil override the CMD. Besides, we do not know UID of a workspace user. I mean we do not know it for sure, unless this is a Che certified image. We'll discuss this with engineers.

@ghost
Copy link

ghost commented Mar 21, 2016

#754 This pull request addresses the problem. I'm closing the issue. Feel free to reopen if the problem is still there (you may try the latest nightly build in ~24 hrs)

@ghost ghost closed this as completed Mar 21, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs. status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it.
Projects
None yet
Development

No branches or pull requests

2 participants