SSH and SFTP1 min readUpdated

Folders and file ownership on Gen2 applications

Where code, shared files and logs live, who owns them, and why you never need chmod 777.

Every application has the same layout, owned by its own Linux user.

PathWhat
/srv/apps/<app>/currentThe live code (for Magento and Laravel, a link to the current release).
/srv/apps/<app>/releasesPrevious releases, for rollbacks (Magento and Laravel).
/srv/apps/<app>/sharedFiles that survive deploys: env.php, media, var/log and the other shared paths.
/srv/apps/<app>/logsnginx and PHP logs of this application.
/srv/apps/<app>/backups-downloadBackup downloads, kept 24 hours.

Never use chmod 777. It is never needed here: PHP runs as the application's user and SFTP users write as that user too.

PHP is limited to the application's own folder (open_basedir): code in one store can never read another store's files.

Did this solve it? If not, tell us what you see and we look at your server.

Open a ticket

Still stuck? Ask a person.

Tickets go straight to the engineers who run ShopWhizzy servers. Tell us the store, what you see and when it started, and we take it from there.