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
Access to external files #33
Comments
Where is the file you need access to? We only map certain directories to the namespace, so this is probably where it comes from: https://github.com/matthewbauer/nix-bundle/blob/master/nix-user-chroot/main.cpp#L102-L110 Until recently, /home was not mapped. I'm starting to think we should just map everything. |
The files are under my own home, in the same directory as the generated bundle. Is the behavior I saw expected? Indeed, it would be nice to have the option of having the file system intact except for the nix store. |
This PR adds a `/root:root` mapping so that users with UID 0 can run bundles that use `$HOME`. Related to matthewbauer#33 .
I'm running into problems when trying to access external files. My application is failing to access anything outside of the bundle even /
I build the bundle inside a nix expression as seen at #25
The real application is not a shell script but fails in a similar way while trying to access the file system. I guess I'm missing something big here? |
Ok I'm having a hard time pinning the error down. Sorry for making noise here, but I think I should make this straight. The above bundle doesn't work because 'ls' is not bundled. Using Version 0.2.0 my app failed because /var is not available, this is fixed in 0.3.0 as far as I know. |
@matthewbauer is that possible to do? I found this ticket because I used the command to bundle saltstack and am getting that there's no |
I'd love for this to happen (I just got done debugging this before tracking my problem down to this issue). I ultimately resolved it by getting my files in via FWIW, if filesystem isolation was a Big Selling Point then I'd hesitate to ask for "map everything", but as it stands this is sort of surprising behavior and changing it to have visibility into the rest of the filesystem would make it behave more like "just another executable". Thanks for tracking this 👍 |
Is there a way to map everything like:
? Bundling emacs, copying it to a non-Nix system, and running it there is not very useful if it cannot find my ~/.emacs.d/init.el and read/write files on the host/target system generally. I was able to get a relocatable emacs that finds my init.el and can read/write files on the target/host system with Guix pack and here |
I am trying to access external files from a bundled executable, and I am getting "File not found" errors. As I understand, the executable is in a virtual file system, so that it is understandable it not finding the files. Is there any solution for this?
Thanks!
The text was updated successfully, but these errors were encountered: