roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.88k stars 1.64k forks source link

Remove/replace all symbolic links #7151

Closed mvorisek closed 4 years ago

mvorisek commented 4 years ago

Symbolic links are not normally supported on Windows, see release extraction log:

! Cannot create symbolic link ...\roundcubemail-1.4.2\vendor\bin\crypt-gpg-pinentry
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\vendor\bin\rcubeinitdb.sh
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\plugins
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\skins
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\.htaccess
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\program\js
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\program\resources
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\plugins
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\skins
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\program\js
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.
! Cannot create symbolic link ...\roundcubemail-1.4.2\public_html\program\resources
! You may need to run WinRAR as administrator
  A required privilege is not held by the client.

Symbolic links are often also disable in Apache config.

Analyse if the symbolic links are used and remove them or replace them with another solution.

alecpl commented 4 years ago

I don't give a shit about Windows. We may consider adding a warning in INSTALL file, that's it. I'll not spend time on this issue.

alecpl commented 4 years ago

The fact that it is a first complaint about it in 10 years since we use symlinks means something.

mvorisek commented 4 years ago

Would it be possible to:

Where are the symlinks from public_html/ used? In Windows the symlinks are not created and the RC seems to be working fine.

The fact that it is a first complaint about it in 10 years since we use symlinks means something.

On other platforms the symlinks are often disabled in webserver config and it seems that there are just some leftover from old times and I found it just by coincidence...

alecpl commented 4 years ago

Would it be possible to:

  • simply rm -R vendor/bin/ in the release script

No, we're using these scripts

* delete & commit all symlinks in `public_html/`

No, what do you mean "delete & commit"?

On other platforms the symlinks are often disabled in webserver config and it seems that there are just some leftover from old times and I found it just by coincidence...

There are no leftovers in the package

smares commented 4 years ago

Windows does support symlinks on NTFS, it's just that you need administrative privileges for creating them which is what WinRAR even tells you. Edit: Windows 10 Creators Update introduced the ability to create symlinks as non-administrator as well, applications must use the SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag when calling the CreateSymbolicLink API which WinRAR probably does not do. Also, enabling symlinks in Apache is possible.

The purpose of the symlinks in public_html is if you make public_html the document root of your VHost in Apache. Your Roundcube installation works because you probably have the root Roundcube folder set as your document root.

alecpl commented 4 years ago

I added note to the INSTALL file.

ygoe commented 3 years ago

I don't give a shit about Windows. We may consider adding a warning in INSTALL file, that's it. I'll not spend time on this issue.

This is certainly not the tone with which you can solve problems. More like the opposite. I'll spare you with data on market shares and probabilities of offending or excluding people with that statement.

I also just noticed this problem when unpacking the complete archive of v1.4.9 with 7-Zip. I never noticed this before but older archives I still have here show the same warnings now. Maybe those symlinks were simply ignored or resolved in previous versions of unpackers or I used another unpacker (unlikely).

So now the INSTALL file doesn't explain anything but simply points to this issue. And this issue doesn't explain anything but show disinterest in platform support. I'm left with an open question: Can I ignore these links or are they required for something?

PS: Oh and that note in the INSTALL file is useless if users come from that page: https://github.com/roundcube/roundcubemail/wiki/Installation Windows and 7-Zip are explicitly mentioned there, probably by more tolerant authors.

smares commented 3 years ago

Again, symbolic links are supported under Windows with NTFS. WinRAR for example tells you exactly what you have to do, that is, launch it as administrator to support creating those symbolic links. People just have to read the messages they are being displayed.

ygoe commented 3 years ago

I'm not looking for a solution that involves enhanced privileges that are not found in every environment.

Still, the question remains open: Are the files and directories related to those unknown links relevant or can they safely be ignored?

smares commented 3 years ago

It depends what you set as your document root.

ygoe commented 3 years ago

Nothing, just leave the defaults. The application is in its own subdirectory, so setting a document root does not apply here.

smares commented 3 years ago

Then you can ignore the errors. If you were to set the document root to public_html, that wouldn't work without the symlinks.