Skip to content
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

Do not list root directory #416

Closed
ign0tus opened this issue Jul 15, 2024 · 5 comments
Closed

Do not list root directory #416

ign0tus opened this issue Jul 15, 2024 · 5 comments

Comments

@ign0tus
Copy link

ign0tus commented Jul 15, 2024

Specific Demand

Is there a way to exclude the root directory from the directory listing? I want to share different directories with different groups of people without setting a password, but prevent them from accessing the files in another directory if they don't know the directory name.

My idea was that / is only listed by providing password. The other two directories are accessible to anyone who knows the link.

dufs \
  --auth admin:admin@/:rw \
  --auth @/10d4e03e-7a20-4953-a9c5-ddb2993817dc:rw \
  --auth @/95bd2770-0576-410e-adf5-fddd98d2590b:rw \
  /var/lib/dufs

With this configuration, however, both directories are still listed when unregistered users access /.

Exclusion via --hidden does not seem to be possible either, as I cannot apply this to individual directories. --hidden /*/ does not work, and --hidden */ no longer shows any directories at all.

Is there a way to get the behavior I want or is it simply not possible?

Implement Suggestion

@sigoden
Copy link
Owner

sigoden commented Jul 15, 2024

We will not support this feature. see #263 (comment)

@sigoden sigoden closed this as completed Jul 15, 2024
@sigoden sigoden closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@sigoden
Copy link
Owner

sigoden commented Jul 15, 2024

Maybe You should run two instances of dufs with different --path-prefix options.

@ign0tus
Copy link
Author

ign0tus commented Jul 15, 2024

Alright, thanks for the explanation in the linked issue. BTW, I appreciate that the application is kept simple and not all the desired functions are implemented in order to keep the application lean and clear.

Maybe You should run two instances of dufs with different --path-prefix options.

Mh, I'll have to think about it. This requires one instance per directory that I want to share independently, right?

@sigoden
Copy link
Owner

sigoden commented Jul 15, 2024

Dufs path-prefix requires one instance per directory.

If there are many directories, You can also put a reverse-proxy (nginx, trafik) in front of dufs. If the path is / and there is no authentication, block it; otherwise, pass it to dufs.

@ign0tus
Copy link
Author

ign0tus commented Jul 15, 2024

If there are many directories, You can also put a reverse-proxy (nginx, trafik) in front of dufs. If the path is / and there is no authentication, block it; otherwise, pass it to dufs.

That's an excellent idea, thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants