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

umask for master process is set to 0 #3878

Closed
eugene-katsevman opened this Issue Jan 6, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@eugene-katsevman

eugene-katsevman commented Jan 6, 2018

On my system when I do buildbot restart master twisted is run as a daemon and its umask is set to 0.

This leads to all work and build directories of local workers and master itself having 777 permissions

@tardyp

This comment has been minimized.

Show comment
Hide comment
@tardyp

tardyp Jan 6, 2018

Member

Hi,
I cannot reproduce this.

I would appreciate a little bit more details.

in your buildbot.tac, do you have those lines:

# Default umask for server
umask = None

There is no difference between buildbot restart and buildbot start in how the process is starting.
You can add a log here to see if this is buildbot which is setting the umask:
https://github.com/buildbot/buildbot/blob/master/master/buildbot/master.py#L230

Member

tardyp commented Jan 6, 2018

Hi,
I cannot reproduce this.

I would appreciate a little bit more details.

in your buildbot.tac, do you have those lines:

# Default umask for server
umask = None

There is no difference between buildbot restart and buildbot start in how the process is starting.
You can add a log here to see if this is buildbot which is setting the umask:
https://github.com/buildbot/buildbot/blob/master/master/buildbot/master.py#L230

@eugene-katsevman

This comment has been minimized.

Show comment
Hide comment
@eugene-katsevman

eugene-katsevman Jan 6, 2018

Hey, thanks for the quick response!
I've modified umask in buildbot.tac to have 0o22 value and by logging I can confirm that this value is being set (where you pointed at).
But!
I've connected with gdb to twisted process and call/o umask(0) gives me 0 immediately. Repo workdir is being created with 777 permission.
If it helps, I'm using a single LocalWorker.

I can provide any other info you need, I just don't know what to.

eugene-katsevman commented Jan 6, 2018

Hey, thanks for the quick response!
I've modified umask in buildbot.tac to have 0o22 value and by logging I can confirm that this value is being set (where you pointed at).
But!
I've connected with gdb to twisted process and call/o umask(0) gives me 0 immediately. Repo workdir is being created with 777 permission.
If it helps, I'm using a single LocalWorker.

I can provide any other info you need, I just don't know what to.

@eugene-katsevman

This comment has been minimized.

Show comment
Hide comment
@eugene-katsevman

eugene-katsevman Jan 6, 2018

an update - umask for localworker is False for whatever reason

2018-01-06 17:37:16+0300 [-] Starting Worker -- version: 0.9.15
2018-01-06 17:37:16+0300 [-] with the umask False

eugene-katsevman commented Jan 6, 2018

an update - umask for localworker is False for whatever reason

2018-01-06 17:37:16+0300 [-] Starting Worker -- version: 0.9.15
2018-01-06 17:37:16+0300 [-] with the umask False

tardyp added a commit to tardyp/buildbot that referenced this issue Jan 6, 2018

fix umask is set to 0 when using localWorker
since 9f2d60d usepty is no more an argument of
BaseWorker, so usepty set as a positional argument was actually setting the umask to 0

Fixes: buildbot#3878
@tardyp

This comment has been minimized.

Show comment
Hide comment
@tardyp

tardyp Jan 6, 2018

Member

can you try the fix in #3881 ?

Member

tardyp commented Jan 6, 2018

can you try the fix in #3881 ?

tardyp added a commit to tardyp/buildbot that referenced this issue Jan 6, 2018

fix umask is set to 0 when using localWorker
since 9f2d60d usepty is no more an argument of
BaseWorker, so usepty set as a positional argument was actually setting the umask to 0

Fixes: buildbot#3878
@eugene-katsevman

This comment has been minimized.

Show comment
Hide comment
@eugene-katsevman

eugene-katsevman Jan 6, 2018

It works! Thanks!

eugene-katsevman commented Jan 6, 2018

It works! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment