Skip to content

Commit

Permalink
fix #2 -- by default map the uid and gid to be the same as the user d…
Browse files Browse the repository at this point in the history
…oing the mounting
  • Loading branch information
williamstein committed Oct 16, 2023
1 parent 04d42af commit ec72138
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions websocketfs/lib/mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface Options {
remote: string; // e.g., websocket server -- ws://localhost:4389
// NOTE: we change some options from the defaults, but you can set anything
// explicitly via mountOptions, overriding our non-default options.
// One is that we set the uid and gid of the client user by default.
mountOptions?: Fuse.OPTIONS;
connectOptions?: IClientOptions;
reconnect?: boolean;
Expand Down Expand Up @@ -49,6 +50,8 @@ export default async function mount(
mkdir: true,
fsname: remote,
autoUnmount: true, // doesn't seem to work, hence the process exit hook below.
uid: process.getuid?.(),
gid: process.getgid?.(),
...mountOptions,
});
await callback(fuse.mount.bind(fuse));
Expand Down

0 comments on commit ec72138

Please sign in to comment.