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

Unsupported symbolic link encountered #16185

Open
patrickatwsrn opened this issue May 14, 2022 · 1 comment
Open

Unsupported symbolic link encountered #16185

patrickatwsrn opened this issue May 14, 2022 · 1 comment
Labels
bug The issue in the code or project, which should be addressed.

Comments

@patrickatwsrn
Copy link

Bug report

Summary

Directories with symlinks trigger an error warning whenever the file tree is activated. This is caused by one or more symlinks inside the directory.

All content inside such a directory is not displayed by the manager. It also doesn't support create file/directory.

Very likely connected to this issue: #13970

Step to reproduce

Install mjml (or any other repo working with symlinks)

npm install mjml

This error message pops up whenever you open the files tab:

Unsupported symbolic link encountered at location /www/core/components/mjml/node_modules/.bin/html-beautify

image

This is how my components/mjml directory looks like:

image

Clicking on .bin doesn't show any content.
On the server it looks like this:

image

Observed behavior

How it behaved after following steps above.

Expected behavior

No error message. All files, directories and symlinks should be displayed.

To be honest, I'm not sure how symlinks should be displayed. I "think" id like to have some visual feedback what kind of file I see, but I don't have an ide how this should be communicated.

Environment

MOD Cloud nginx, MODX3.0.1

@patrickatwsrn patrickatwsrn added the bug The issue in the code or project, which should be addressed. label May 14, 2022
@JoshuaLuckers
Copy link
Contributor

JoshuaLuckers commented May 16, 2022

Apparently symlinks are not supported by Flysystem (the dependency we use for interactions with filesystems).

@PatrickRose symlinks break the one of the "principles" in flysystem, which is the "all paths are relative" one. With support of symlinks, this constraint can't be easily enforced, and the way to enforce is would have a lot of arbitrary decision making. Like: Given strategy X, when a symlink is encountered, either ignore, disallow or follow. When following the outputted path should A not change, B be the linked path. Listings would be increasingly difficult. All these things weigh into me not wanting to go into this direction. But the main reason is: Given all paths are relative, all paths should reside within a directory, symlinks can only like to things within the root path, which is a very rare use-case.

Originally posted by @frankdejonge in thephpleague/flysystem#599 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants