User Tools

Site Tools


gen:external-dir

How can the VHost/Website access parent folders or the full directory tree of the linked user

Under N99panel a VHost/Website's folder is present under a user as /home/user101/website_public_html . If a user is user101 , and the website is example.com , VHost/Website path would be /home/exmpl/example.com_public_html .

The PHP code is not able to access the folders above this path i.e. it will not be able to access /home/user101/fldr1 nor it will be able to access /home/user101 . This scenario is indeed desired as a matter of security practices. But if you wish to use /home/user101/fldr1 , you can use it via the 'expose dir' feature under N99panel

Various steps involved in it are

Step 1 : Log into N99panel. From under N99panel dashboard, click 'List Users'


Step 2 : You will see the list of all the users. Please click 'Expose Dirs' link against the appropriate user


Step 3 : A textbox would be presented and a typical entries under that would be like

The paths would be referred after /home/user101/

Where a parent folder needs to be accessible via PHP scripts

fldr1:fldr1:example.com

Above fldr1 is physically present as /home/user101/fldr1 and is exposed as /home/user101/fldr1

Where a parent folder being a large external volume, where it typically would be of a large size and not part of incremental backups, is used w.r.t. URL references

media:example.com_public_html/media:example.com

Above media is physically present as /home/user101/media and is exposed as /home/user101/example.com_public_html/media

Where you wish to access the full directory structure of the user (high un-advisable)

USER_HOME_DIR:USER_HOME_DIR:example.com

gen/external-dir.txt · Last modified: 2024/04/09 04:47 by kirtisingh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki