Skip to content

Instantly share code, notes, and snippets.

@evgv
evgv / mage2_foler_file_permissions.md
Last active October 7, 2023 16:14
Magento 2 folder/file permissions

Magento 2 folder/file permissions

  • The owner of the Magento file system: Must have full control (read/write/execute) of all files and directories.
  • Must not be the web server user; it should be a different user.
  • The web server user must have write access to the following files and directories: var app/etc pub
  • In addition, the web server's group must own the Magento file system so that the Magento user (who is in the group) can share access to files with the web server user. (This includes files created by the Magento Admin or other web-based utilities.)
We recommend setting the permissions as follows:
All directories have 770 permissions.
@leonkorteweg
leonkorteweg / mirror-remote-folder-lftp.md
Last active February 29, 2024 17:25
Mirror a remote folder from the command line

Mirror a remote folder from the command line

Small but incredibly useful guide from wiak, posted on http://superuser.com/questions/40281/how-do-i-get-an-entire-directory-in-sftp

How to mirror a remote folder with lftp

well this little guide should help, mirror a remote server to local folder with lftp

lftp sftp://user:password@server.org:22 -e 'mirror --verbose --use-pget-n=8 -c /remote/path /local/path'