Commando's

Beschikbare schijfruimte 

 */10 * * * * du -sh /data/sites/web/damnortabe > /data-sites/web/damnortabe/shared/private/usedspace.txt 

 Analytics weekoverzicht email uitsturen 

 0 17 * * sun drush -r "/data/sites/web/damnortabe/current/web" analytics:weeklymail >> /data/sites/web/damnortabe/logs/cron.log 2>&1 

 Andere SSH commando's 

 chmod -R 777 web/sites/default

mv web/sites/default/files production/web/sites/default

ln -s /data/sites/web/tgeriefbe/production/web /data/sites/web/tgeriefbe/www

mv -v production/web/sites/defaul/* production/web/sites/default/files/

mv shared/web/sites/default/files development/web/sites/default

chmod u+x vendor/bin/drush

chmod u+x vendor/drush/drush/drush

chmod u+x vendor/bin/drupal

chmod u+x vendor/drupal/console/bin/drupal

ssh ssangyongbe@ssh038.webhosting.be test -f /data/sites/web/ssangyongbe/tmp/.phpreload_secret && echo "YES file exists" || echo "NO file does not exist" 

 (laatste lijn uit bestand tonen op scherm) 

 tail -n 1 error.log 

 grootste folders vinden via ssh 

 du -a projects/ | sort -n -r | head -n 20

du -Sh | sort -rh | head -5

du -hs * | sort -rh | head -5

du -a webform | sort -n -r | head -n 5 

 Drupal file en folder rechten instellen 

 

 folder sites/default/files: 755 

 alle folders binnenin sites/default/files: 755 

 alle files binnenin sites/default/files: 644 

 .htaccess in sites/default/files: 755 

 

 cd development/web/sites

find . -type d -name files -exec chmod 0755 {} \;

for x in ./*/files; do

 find ${x} -type d -exec chmod 0755 {} \;

 find ${x} -type f -exec chmod 0644 {} \;

 find ${x} -type f -name ".htaccess" -exec chmod 0755 {} \;

done

chmod 755 sites/default/files

chmod 644 sites/default/settings.php

chmod 644 sites/default/settings.local.php

chmod g+r,g+w private 

 TMP folder (zie admin/config/media/file-system) 

 ls -l

chown www-data -R /data/sites/web/ssangyongbe/tmp

chmod 755 -R /data/sites/web/ssangyongbe/tmp

cd /data/sites/web/ssangyongbe

chown ssangyongbe -R tmp

chmod 755 -R tmp 

 Combell www symlink aanpassen 

 

 Ga naar root die www folder bevat, bv: /data/sites/web/maxusmotorsde 

 Als www een folder is: rm -rf /data/sites/web/maxusmotorsde/www 

 Als www reeds een symlink is: rm /data/sites/web/maxusmotorsde/www 

 Dan nieuwe symlink aanmaken: ln -s /data/sites/web/maxusmotorsde/production/web /data/sites/web/maxusmotorsde/www 

 test symlink: ls -alih 

 

 Site local drush gebruiken op (combell) hosting 

 drush --version

-> geeft nu bv: 8.1.17

rm vendor/bin/drush

-> dan is file MET symlink weg

-> manueel de file terug uploaden

chmod u+x vendor/bin/drush

drush --version

-> geeft nu bv: 9.7.2