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

Temporary Directory Is Created As root Without Write Permissions #32

Open
kiler129 opened this issue Jul 3, 2018 · 4 comments
Open

Comments

@kiler129
Copy link

kiler129 commented Jul 3, 2018

Either I'm doing something really dumb, or RunAs plugin is unusable when you need to use temporary directory. The directory is created as root:root with 755 permissions, which makes build impossible to save anything.

Work directory is also inaccessible, so running e.g. php composer produces:

[14:16:12]	[Step 2/2]   [RuntimeException]                                                                                        
[14:16:12]	[Step 2/2]   /opt/jetbrains/TeamCity/buildAgent/work/f613c80626aaf1ff/vendor does not exist and could not be created.  
@NikolayPianikov
Copy link
Contributor

@kiler129 could you provide more details. Steps to reproduce, build log file might be really helpful

@KarlManong
Copy link

KarlManong commented May 18, 2022

I have the same issue using the latest nightly build
Flink_Build_3.log

@sresnik-e-courier
Copy link

I have the same issue. I'm running my build agent as root, and relying on the runAs plugin. It appears that the temp directory under the build agents working directory (~/BuildAgent in my case) is deleted and recreated after every build. However, it is created using 755 permissions. This causes builds to fail if they require access to the temp directory while using the runAs feature.

@beatmax
Copy link

beatmax commented Feb 15, 2023

In my case, also the fact the git checkout is done as root was a problem. As a workaround I've configured the build to use a fixed directory (e.g. /home/teamcity/example), created a script with "chown -R user. /home/teamcity/example", added "user ALL=(root) NOPASSWD: /path/to/the/script.sh" to /etc/sudoers, and added "sudo /path/to/the/script.sh" as the first build step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants