Modifying cPanel template does not change live

hlc

Member
Feb 10, 2015
7
0
1
cPanel Access Level
Root Administrator
Hello,

Further to this suggestion:
https://forums.cpanel.net/threads/customizing-the-directory-path-for-ftp-users.162002/#post-678994

I'd like to change what is shown (eg, by default don't add /<USERNAME>/ to the public_html folder) to the user when an FTP account is created.

it appears there are two files where this can be altered:
/usr/local/cpanel/base/frontend/x3/ftp/add_ftp_form.html
/usr/local/cpanel/base/frontend/x3/ftp/accounts_pure-ftpd.html

YAHOO.util.Event.on("login", "change", function() {
- YAHOO.util.Dom.get("homedir").value = "public_html/" + YAHOO.util.Dom.get("login").value;
+ YAHOO.util.Dom.get("homedir").value = "public_html/";
dir_validator.verify();
});


However, changing those files has no effect on the FTP Create page - is it being cached somewhere (yes, I did clear the browser cache) on the server, or am I barking up the wrong tree here?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello,

I've moved this thread to our "User Experience" forum, however this type of change is not typically supported. Could you elaborate on the reason you want to hide the account username during the FTP account creation? We might be able to offer an alternative solution to the problem.

Thank you.
 

hlc

Member
Feb 10, 2015
7
0
1
cPanel Access Level
Root Administrator
Hello,

I've moved this thread to our "User Experience" forum, however this type of change is not typically supported. Could you elaborate on the reason you want to hide the account username during the FTP account creation? We might be able to offer an alternative solution to the problem.

Thank you.
99% of our customers are not technically competent, so when we request that they use cPanel to create their FTP account to update their website, having the system append the username to the folder by default does not help anyone in terms of keeping things simple. The end result, typically, is the customer phoning us because when they publish their website, the changes are not seen, since the update goes into a folder with their ftp "username" (public_html/username), and not in the website proper (public_html)...

Bottom line: this is to simplify and improve the user experience, since in our case, we get far too many frustrated customers calling us not understanding why their FTP account doesn't work as expected (they only typically ever create one FTP account anyway). One can argue about this being the right/wrong way, but in our view it's the best business strategy.

So, what file can I modify to get this behaviour? As mentioned in the original post, changing the indicated files does not change the FTP account creation page in question.

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
I'm not aware of any supported method of changing the interface itself. I'll leave this thread open for input from others, but one alternative is to disable the FTP Accounts feature in the feature list associated with the packaged assigned to the account. Then, the users are forced to use the cPanel username/password, which works for FTP.

Thank you.