-
Notifications
You must be signed in to change notification settings - Fork 5
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
Option -f does not work with files in /tmp #26
Comments
It looks strange — at least ctags checks the result of opening a file. |
I tried to reproduce this issue on travis in universal-ctags/ctags#2381. However, I could not. It seems that you are using u-ctags via snap. I guess it is snap specific issue. @tartley, could you look into this issue? |
Thanks all. Confirmed: This is an expected symptom with the way security isolation of snaps works. Snaps cannot access the file system at all by default. We have configured some exceptions, so that our snap can access the user's home directory (with some caveats.) so I'd expect the snap will not read from /tmp. Having spent some time understanding this situation, I'm now ready to request to the snapstore that our snap is converted to a "classic" snap, which DOES have access to the full filesystem. Thanks for the prod, I'll do it today, and report back here... |
@aleb Oh, and yes, working around the problem by redirecting stdout has no downsides, as far as I know, if that works for you. |
I remember reading on https://snapcraft.io/universal-ctags about such a limitation, but I forgot about it, thinking I'll notice an error when I get to using it. Probably snap allows using Thanks for the fast investigation! |
FYI, I've asked snapstore if we can change our snap to 'classic' confinement. See the link I posted in a comment on an older issue about this: #4 (comment) |
If that is not accepted by snap, consider error-ing if the output file is in |
I just realized: universal-ctags is probably not outputting any error when it fails to write to /tmp because it is succeeding in writing to some other "/snap/tmp" directory, or maybe some "tmp" dir that is snap specific. So it's going to be hard for it to detect this scenario and output an error message. For one thing, I can probably fix it so that our snap doesn't get its "/tmp" directory mapped elsewhere. That won't fix all classes of problems like this, but at least it will mean users can use "/tmp". |
In this Travis CI build you can see how ctags is executed three times:
https://travis-ci.org/daedaleanai/reqtraq/builds/625770261?utm_source=github_status&utm_medium=notification
First call succeeds and
/home/travis/x123y456
is created fine, but if the output file is set to/tmp/x123y456
the file is not created and universal-ctags does not report any error.As you can see, the
/tmp
folder is writable, so the write error should be reported accordingly. If the stdout is redirected to the file it works fine:(Any reason against working around the issue by using the stdout?)
The text was updated successfully, but these errors were encountered: