PNG IHDR wSȚ -tEXtComment Nxplo
| Server IP : 144.76.1.235 / Your IP : 216.73.216.244 Web Server : Apache/2.4.52 (Ubuntu) System : Linux einkaufsring.com 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.3.16 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/shop.einkaufsring.com/ |
Upload File : |
#!/bin/bash
# Magento 2 file permissions fixer
# Usage: ./fix-perms.sh
# --- CONFIG ---
MAGENTO_ROOT="$(pwd)" # assumes you're in Magento root
WEB_USER="www-data" # Apache/Nginx user (change if different)
WEB_GROUP="www-data"
echo ">>> Fixing permissions in $MAGENTO_ROOT for user $WEB_USER:$WEB_GROUP"
# Set correct ownership
sudo chown -R $WEB_USER:$WEB_GROUP $MAGENTO_ROOT
# Directories that Magento must write to
WRITABLE_DIRS=(
var
pub/static
pub/media
generated
)
# Ensure directories exist
for dir in "${WRITABLE_DIRS[@]}"; do
mkdir -p "$MAGENTO_ROOT/$dir"
done
# Directory permissions: 775
find $MAGENTO_ROOT -type d -exec chmod 775 {} \;
# File permissions: 664
find $MAGENTO_ROOT -type f -exec chmod 664 {} \;
# Special: make sure bin/magento is executable
chmod +x $MAGENTO_ROOT/bin/magento
echo ">>> Permissions fixed. Clearing cache..."
rm -rf $MAGENTO_ROOT/var/cache/* $MAGENTO_ROOT/var/page_cache/* $MAGENTO_ROOT/var/view_preprocessed/*
echo ">>> Done."