Directory structure
Published
Updated
📂
File system structure.
A fortrabbit environment keeps its code in /data/www, where SSH and SFTP start, and a home directory in /data/home. Everything runs as the same user, so strict file modes work.
When you log in with SFTP or SSH to your environment, you can see the directory structure. This is what you'll find:
data
www
home
www
The www folder holds the code and is the login folder, the starting point for SSH and SFTP. Git deployment syncs to it as well. Without a framework or CMS, www itself is the web root (aka document root). Set the root path to any folder below it.
/data/www
home
Like ~ on a local machine. Contains the bash history.
/data/home
Users and permissions
SSH, SFTP and PHP web requests all run as the same user, app. Strict modes such as 700 for directories and 600 for files keep the files private and PHP can still read them. Store private files outside the root path so they are never served over HTTP.