Moving writable folders outside /html

Hi,

Is it possible to move folders from /chroot/home/username/domain.com/html to /chroot/home/username/domain.com?

For example on cPanel, you can move /home/username/public_html/examplefolder to /home/username/examplefolder.

Hi shyuan

I hope your well

Yes, we do this with some of our sites, for instance, whmcs. However, as its outside the host folder (html), it cannot be referenced directly from a browser

I hope that helps

Many thanks

John

Hi John,

Do you mind guiding me? (as I am also currently trying to install WHMCS 6 to test out its feature).

Also, did you move cron directory too? If yes, can you also guide me?

And what are their permissions? 0777?

Thank you. :slight_smile:

Hi shyuan

Yes, can do but it’ll be tommorow when I’m back at the office if alright

We have whmcs 6.2.2 dev installed on a test server, and can give you direct access to have a look for yourself as well, if you want.

If you have purchased whmcs, you could also gain a dev license to test outside of your live whmcs

Yes, cron was moved along with a few other folders, which need full read write perms, but as I said, I need to be at office to give accurate advice

If you want full access to dev, just pm and I’ll pm you details

Hope that’s alright

Many thanks

John

Hi Shyuan
Sorry for the delay, I needed to be at my computer to check or copy few links for you. I’m sure you will have already seen these links etc, but it can be a little confusing sometimes.
Please just remember you need to move/change and update config files, which I think initially we do a standard install, then rename the admin folder, change config file to reflect this, move the correct folders away from host folder, into a private area outside the host files, set permmisions and update config files as needed, or in case of cron, change cron paths so they run correctly.
I am sorry, I thought we had updated to 6.2.2, but it appears we are on 6.2, so we will need to update ourselves at some point.
I have included at the end a list of our folders outside the hosting directing (html_public) so you can see for yourself, but have obscured the domain and hosting folders, which show as NNNNN
If it helps you, you could allow access to me to setup initially, then remove access to me, or I can give you access into our test server with dev whmcs installed, so you can see for yourself.
I hope that helps a little and I would use a proper FTP program to upload and install/change myself.
Many thanks
John

http://docs.whmcs.com/Installing_WHMCS
/configuration.php CHMOD 400 Readable
/attachments CHMOD 777 Writeable
/downloads CHMOD 777 Writeable
/templates_c CHMOD 777 Writeable
http://docs.whmcs.com/Further_Security_Steps
When you move the directories, you need to provide WHMCS with the new paths to use them. You do this by adding (or updating if they already exist) the following lines in the configuration.php file within the root WHMCS directory.
$attachments_dir = “/home/username/attachments/”;
$downloads_dir = “/home/username/downloads/”;
$templates_compiledir = “/home/username/templates_c/”;
In the above example, “username” is the cPanel username and so the 3 folders are located in the home directory, above public_html.
Note that if you are running suPHP or phpSuExec chmod 755 should be sufficient permissions to make the directories writeable as this is the highest permission available for both folders and files when running in that condition.
http://docs.whmcs.com/Cron_Tasks
http://docs.whmcs.com/Customising_the_Admin_Directory
The WHMCS software requires to know the name of the admin directory in order to function, so if you wish to change it, follow the steps below:

  1. Open the configuration.php file within your WHMCS installation’s root directory
  2. At the bottom of the file (before the closing PHP tag ?> if one exists), add the following line:
    $customadminpath = “mycustomfoldername”;
  3. Replacing mycustomfoldername with the name you wish to use for your admin directory. This should just be the directory name, not a full path.
  4. If your configuration.php file already contains a custom admin path definition, you can simply update the existing line
  5. Rename the admin directory to the name you specified in step 2 above
    • You cannot move the admin directory outside of the WHMCS folder tree - you can rename it, but not move it
    • The admin directory name may only contain alphanumeric a-z 0-9 latin characters as well as dashes(-) and underscores(_)
    Important Note for Upgrading
    Remember! If you customise the name of your WHMCS admin directory, when it comes to applying updates or patches, it is important to remember to upload any files contained within the default “admin” directory in the distribution zip files to your custom admin directory folder. Failure to do this will result in unexpected behaviour.
    Our Dev Paths
    •Attachments directory: /home/threeshc/attachments
    •Downloads directory: /home/threeshc/downloads
    •Compiled templates directory: /home/threeshc/templates_c
    •Cron directory: /home/threeshc/whmcs_crons
    •Admin directory: /home/threeshc/3NN.NN.NN/html/NNNNN/NNN

Hi Shyuan
Sorry, a thought has just come to me, sorry I am a little slow sometimes.
I believe from memory you use filemanager, which means I believe, you would not have access to folders outside pubic_html.
If so, you need to use a FTP program, which will give access to private folders as well as public folders.
You could do this using SSH as well, but this depends how well you know linux by moving (mv) or copying (cp) etc… but FTP is generally easier and quicker for this I think
Lastly, I am sure you know, but please make sure apache is set to graceful restart for whmcs
Many thanks and I hope it helps a little
John