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

tsd --save flag modifies permissions of parent directories unnecessarily #125

Open
joshuacc opened this Issue Feb 12, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@joshuacc

joshuacc commented Feb 12, 2015

Using tsd 0.6.0-beta.5.

I have a directory structure that looks like this: /var/www/applications/my-app/tsd.json. Anytime I run tsd with the --save flag, it sets the my-app folder's permissions to 744. As a result, the apache user can no longer execute the application contained in my-app.

The problem appears to be caused by this line.

I can probably put together a pull request to fix the issue, but in order to do so, I have a couple of questions.

  1. Why does tsd traverse the parent directories? Is there any reason it couldn't just start from the project root where it is being run?
  2. Why is tsd modifying permissions on existing directories?
  3. Why is tsd specifying an exact set of permissions rather than just u+w in order to guarantee write permissions exist?

I spent quite a while (several days) on this seemingly random failure, and want to make sure others don't run into the same thing. 😄

Thanks!

@blakeembrey blakeembrey referenced this issue May 1, 2015

Closed

TSD Future #150

7 of 7 tasks complete
@vchrm

This comment has been minimized.

Show comment
Hide comment
@vchrm

vchrm Jul 28, 2015

Unfortunately others do run into the same thing. We have been struggling with this issue for months now. After each tsd call (from cli as well as with gulp-tsd) we need to change permissions to our own folders back again :-(.

My only question is: Why does tsd have to touch the permissions at all? Default mkdir() call creates the directory under default permissions (given by process' umask). Why is not this sufficient?

vchrm commented Jul 28, 2015

Unfortunately others do run into the same thing. We have been struggling with this issue for months now. After each tsd call (from cli as well as with gulp-tsd) we need to change permissions to our own folders back again :-(.

My only question is: Why does tsd have to touch the permissions at all? Default mkdir() call creates the directory under default permissions (given by process' umask). Why is not this sufficient?

@igorbt

This comment has been minimized.

Show comment
Hide comment
@igorbt

igorbt Aug 11, 2015

The same happens in our setup. Any chance this bug will be fixed soon?

igorbt commented Aug 11, 2015

The same happens in our setup. Any chance this bug will be fixed soon?

@karmux

This comment has been minimized.

Show comment
Hide comment
@karmux

karmux Jan 16, 2016

Spent also several hours debugging this.

karmux commented Jan 16, 2016

Spent also several hours debugging this.

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