Skip to content

Instantly share code, notes, and snippets.

@mhshakouri
Forked from solancer/apache-nginx-ftp
Created July 27, 2023 20:20
Show Gist options
  • Select an option

  • Save mhshakouri/8870aabd65b1efe331e9ec6c4397c44c to your computer and use it in GitHub Desktop.

Select an option

Save mhshakouri/8870aabd65b1efe331e9ec6c4397c44c to your computer and use it in GitHub Desktop.

Revisions

  1. @solancer solancer created this gist Jul 27, 2016.
    11 changes: 11 additions & 0 deletions apache-nginx-ftp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@

    // Adding current user to www-data
    sudo adduser $USER www-data

    //change ownership to user:www-data and
    sudo chown $USER:www-data -R /var/www/html
    sudo chmod u=rwX,g=srX,o=rX -R /var/www/html

    // change file permissions of existing files and folders to 755/644
    sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \;
    sudo find /var/www/html -type f -exec chmod g=rws "{}" \;