-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Cannot create a new Gitea user without Gitea system user having read/execute access to current directory #4634
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
Comments
Seems like upstream issue in our used framework (go-macaron) but not sure why |
I am currently (trying) to install gitea for the first time and have the same issue. |
This is because Macaron runs "Getwd returns a rooted path name corresponding to the current directory." So when run in a folder that the running user doesn't have permissions in, this call will fail. Either GItea can try and detect this, and switch to a location where the user does have permissions if appropriate (like running one off commands) using Chdir, or it should be specific that it requires being run in a folder with permissions. |
Damn it calls this on |
We could just temporarily move ourselves to a temporary path, and once macaron has initialized move ourselves back? |
OK could someone try #6559 overnight. It might fire early enough to protect otherwise we'll have to move to a file perhaps called a.go |
Also ran into this. Made a temporary workaround in
|
Outdated, there are a lot of refactoring for the vendor packages. Feel free to reopen if there is still a problem. |
[x]
):Description
Trying to create a new user using command-line tools (
sudo -u git gitea admin create-user --name=user --password=pass [email protected] --config=/usr/local/etc/gitea/conf/app.ini
, git being Gitea user) while being in a directory without Gitea user having access to it (like/home/john
with700
permissions) causes this error:Entering a different directory with git having access to it (
/
for example) fixes this issue. Honestly I do not really understand why gitea even checks the current directory, as it has nothing to do with what it is doing.The text was updated successfully, but these errors were encountered: