Bug 46521 - mod_dav doesn't show symlinks
Summary: mod_dav doesn't show symlinks
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_dav (show other bugs)
Version: 2.4.16
Hardware: PC FreeBSD
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2009-01-13 06:05 UTC by Bastien Nocera
Modified: 2015-12-21 23:13 UTC (History)
2 users (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Nocera 2009-01-13 06:05:50 UTC
If I were to create symbolic links to a large file, to be shared via WebDAV, the file will not show up on the client.

In httpd/modules/dav/fs/repos.c
        /* ### for now, only process regular files (e.g. skip symlinks) */
        if (fsctx->info1.finfo.filetype == APR_REG) {

It should follow the options FollowSymlinks and SymLinksIfOwnerMatch instead.

This is a problem for users that want to share large files using gnome-user-share (see http://bugzilla.gnome.org/show_bug.cgi?id=326702 )
Comment 1 Joe Orton 2009-01-14 05:20:35 UTC
The traditional attitude to this type of issue has been that "the DAV repository" includes content which can be managed by mod_dav, and that does not include symlinks, so symlinks should not be exposed in PROPFIND results.  (nor sockets, named pipes, etc)

Simply saying "respect FollowSymlinks" is not really the whole story; we'd still have to decide e.g. how to handle symlinks which point outside the DAV repository, if turned off, for example.

Also note that SymlinksIfOwnersMatch is not a security feature.
Comment 2 Ben RUBSON 2015-12-21 23:13:04 UTC

Could we think about adding such feature to mod_dav please ?
Module could keep its current behavior by default, and we could have an option : ShowSymLinks <yes|no>

For security reasons, links would not have to be followed by server itself.
So no risk to give a out-of repository file to the client.
Symbolic links would simply have to be presented to the client, so that for example client would be able to duplicate them (duplicate these symbolic links as symbolic links on its local storage).

I found a patch proposal which is unfortunately quite outdated today (2003 !) :

Thank you very much !