Create symlinks in FileManager

digignosis

Verified User
Joined
May 15, 2023
Messages
6
The patch notes for 1.649 say at #removed-domain-private-html-directory-or-symlink-toggle:
Stating there: "Users can still replicate this functionality with FileManager if desired."
I assume this means the System Info & Files > File Manager page.
But how? There is no option to create symlinks in the FileManager... If this option is not visible by default, but can be enabled, how would I do this?

I saw someone mention in another recent thread, that when creating a new domain, the symlink that points private_html to public_html is created automatically now (which would be a handy solution). But unfortunately this is not the case on our Directadmin installs, adding a new domain just creates a normal private_html folder like always, with no way anymore to fix a symlink either via directadmin or the filemanager.

I also tried simply removing the private_html directory altogether (in hopes it would default to public_html when missing), but this just breaks https functionality.
 
We are in the same situation, as always, introducing changes like crazy, without going through functional tests, we do not see the option in the file manager so that the client can correct it without resorting to CLI, new users are enabled by default but the old ones that have not enabled it on previous occasions? Incredible
 
For the DA devs, a welcome fix would be:
contextually still show the toggle button with an updated tooltip / confirmation dialog: only for domains that actually still have an (empty) private_html folder. So that in these cases it can still be toggled once, as a final fix.

As it stands now, to change an existing private_html dir to a symlink while staying within DA and not having to resort to CLI:
- You can change the skin back from Evolution to an old one, to see the option again. Not exactly evolution, but hey it works.

On the upside, for older DA installs that are not configged to make the symlink by default, I read DA 1.650 will do away with the global parameter (default_private_html_link=) and just always make a symlink for new domains no matter what.
 
Stating there: "Users can still replicate this functionality with FileManager if desired."
I think you understood the meaning the wrong way.

Formerly there was a button to symlink private_html to public_html, and at a certain time, that symlink was active by default.
Since it's almost never used anymore, it automatically symlinks to public_html so there is no need to create that symlink anymore.

It's only when you want to have a seperate private_html directory, then via the File Manager you can remove the private_html symlink and create a private_html directory yourself.

Downside... indeed you can't create a symlink again from the file manager as far as I can see.
 
Of course, and that's the problem, if you delete the private to break the symbolic link, you can't recreate it, you have to resort to an obsolete skin to re-enable it, or do it by cli
 
But unfortunately this is not the case on our Directadmin installs, adding a new domain just creates a normal private_html folder like always, with no way anymore to fix a symlink either via directadmin or the filemanager.
DA defaults to creating private_html as a symlink for the last 5 years. If DA still creates directories means you have older installation or do have default_private_html_link=0 configured in directadmin.conf.

Expected way of getting rid of private_html dirs is described here - https://docs.directadmin.com/change...ns-with-separate-public-html-and-private-html

In FM it is possible to take any private_html -> public_html symlink and copy it to other domain or subdomain dir. However it is not possible to create new symlinks. If fixing it manually is too troublesome we could restore old functionality in GUI. It was removed because it will soon be obsolete.

1684998521605.png
1684998570310.png
 
I think you understood the meaning the wrong way.
I understand that what you say is what the patchnote intended to say. However, the patchnote explicitly states twice that it's about "switching between these two modes" and that you can replicate this with the Filemanager, and this is not possible (like you say, you can only go one way with the Filemanager, not both). So updating this patchnote would help a lot to prevent confusing users looking for a solution, especially because DA is breaking functionality that is at the root of hosting a domain.

Anyway, thanks for chipping in, looks like I'm getting the whole picture now and it seems I already have 5 or 6 options to fix my installs / domains that are affected, so I'll be fine.
 
In FM it is possible to take any private_html -> public_html symlink and copy it to other domain or subdomain dir.
Thanks, I didn't know you could copy the symlinks, that's going to come in handy.

Maybe it's possible to just use public_html by default when the private_html folder (or symlink) is missing altogether? That way we could just delete the private_html folder (or symlink) entirely and that would be it.
 
@digignosis we could extend the maintenance task used to detect private_html directories to automatically fix it if dir is missing. This is a trivial fix case.
 
Back
Top