Make private_html the default location loaded by File Manager/Files for a user

TomJones

Verified User
Joined
May 9, 2004
Messages
76
Hi DA,

So one of my users has gone to strictly serving SSL content, so public_html is empty. The minor annoyance is in the user admin panel, whenever I want to get to their private_html folder I have to take a roundabout way to get to it (there are a few routes, at least two clicks each to get there). Is there a way to add the private_html as a default folder location in the File Manager location in the admin panel (for just one user)?
 
I presume you're referring to the public_html symbolic link being available at the user level but not the one for private_html. Am I correct?

If so you can create a private_html symbolic link for that user. The link is not used by anything in DirectAdmin; it's there strictly as a convenience for the majority of ftp users.

Note however that if you create your own, it won't change automatically if the user adds a new domain and makes it the primary domain. You'd have to make any desired change manually by deleting and rebuilding the link.

Jeff
 
Could it be an option to move the website to public_html and let DA create a symlink from private_html to public_html? The website then only needs to redirect traffic from http to https. This can also be done by htaccess. If this is not an option, I wonder why not (are users getting a 404 when accessing http?)
 
You got it Jeff. I just want to see the private_html folder/link when I open the user File Manager. Do you know where in the user directory structure I would put the sym link?

Arieh, I've done 301 redirects in the public_html htaccess to redirect all traffic to https permanently. Wouldn't redirecting all traffic (because I no longer want to serve http) come with a performance/time cost?
 
The only performance increase it may cause is that each hit will be checked if it's on https or not. Though it's an extreme small cost for the server.

But you can also make the symlink:

under the user:

Code:
cd ~
ln -s ./domains/yourdomain.tld/private_html/ private_html
 
And to clarify, Arieh's suggested code will work when logged in to the shell as the account user.

Jeff
 
Hmmm, that didn't seem to work, it created the private_html link in the ~ dir, but I don't see the link when I open the user File Manager.
 
Last edited:
The file manager should certainly see it when you look from the ~ (login). Do you see it from an FTP login? From a shell login?

Jeff
 
Oh wait a minute, just re-read your last post more carefully Jeff. I was logged into the shell, but I didn't su to the correct user. Works perfectly, thanks to the both of you!
 
Back
Top