Add support for following symbolic links #7

Open
opened 2026-08-19 14:47:11 +00:00 by crumbcake · 0 comments
Owner

The current implementation of only_dirs_and_files filters out symbolic links entirely. This decision was made originally because WebDAV does not have a concept of symbolic links and supporting them would introduce weird semantics issues, but there are limited use cases for links that are worth exploring:

  • Creating a link in a public directory that points to a file in a hidden one, allowing the user to selectively expose private files without duplicating them
  • Creating one or more links to very large files (e.g. movies, backups, raw data) so that it can be accessed from multiple locations without duplicating them

Alternatively this could be accomplished at the filesystem level with hard linking to avoid having to deal with symbolic links. If it was implemented, there would need to be configuration options in place to control how symbolic links were followed, displayed in the web interface, how authentication would be handled, and whether or not a symbolic link outside the data tree would be permitted.

The [current implementation](https://git.crumbcake.cc/crumbcake/pyFileServer/src/commit/95095460a14f443d3e4bac2352892da441d7c1b4/src/pyfileserver/filters.py#L58-L62) of `only_dirs_and_files` filters out symbolic links entirely. This decision was made originally because WebDAV does not have a concept of symbolic links and supporting them would introduce weird semantics issues, but there are limited use cases for links that are worth exploring: - Creating a link in a public directory that points to a file in a hidden one, allowing the user to selectively expose private files without duplicating them - Creating one or more links to very large files (e.g. movies, backups, raw data) so that it can be accessed from multiple locations without duplicating them Alternatively this could be accomplished at the filesystem level with hard linking to avoid having to deal with symbolic links. If it was implemented, there would need to be configuration options in place to control how symbolic links were followed, displayed in the web interface, how authentication would be handled, and whether or not a symbolic link outside the data tree would be permitted.
Sign in to join this conversation.
No description provided.