Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Tweeted twitter.com/StackMagento/status/842663275552739328
added 505 characters in body
Source Link
DarthVegan
  • 717
  • 8
  • 18
  • 33

Someone changed my php version for my magento 2 website to 5.6 and I changed it back to 7.0 and now I'm getting this error when I try to run the major magento commands such as compile and system:upgrade

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') 1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() 5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') 6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

What can I do to fix this error?

UPDATE: Here are the results when I run rm -rf var

rm: cannot remove ‘var/di/setup.ser’: Permission denied
rm: cannot remove ‘var/di/webapi_rest.ser’: Permission denied
rm: cannot remove ‘var/di/frontend.ser’: Permission denied
rm: cannot remove ‘var/di/global.ser’: Permission denied
rm: cannot remove ‘var/di/adminhtml.ser’: Permission denied
rm: cannot remove ‘var/di/crontab.ser’: Permission denied
rm: cannot remove ‘var/di/webapi_soap.ser’: Permission denied

Someone changed my php version for my magento 2 website to 5.6 and I changed it back to 7.0 and now I'm getting this error when I try to run the major magento commands such as compile and system:upgrade

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') 1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() 5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') 6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

What can I do to fix this error?

Someone changed my php version for my magento 2 website to 5.6 and I changed it back to 7.0 and now I'm getting this error when I try to run the major magento commands such as compile and system:upgrade

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') 1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() 5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') 6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

What can I do to fix this error?

UPDATE: Here are the results when I run rm -rf var

rm: cannot remove ‘var/di/setup.ser’: Permission denied
rm: cannot remove ‘var/di/webapi_rest.ser’: Permission denied
rm: cannot remove ‘var/di/frontend.ser’: Permission denied
rm: cannot remove ‘var/di/global.ser’: Permission denied
rm: cannot remove ‘var/di/adminhtml.ser’: Permission denied
rm: cannot remove ‘var/di/crontab.ser’: Permission denied
rm: cannot remove ‘var/di/webapi_soap.ser’: Permission denied
Re Formatted
Source Link
Khoa TruongDinh
  • 32.3k
  • 11
  • 90
  • 156

Someone changed my php version for my magento 2 website to 5.6 and I changed it back to 7.0 and now I'm getting this error when I try to run the major magento commands such as compile and system:upgrade

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') #11 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #22 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #33 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #44 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() #55 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') #66 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #00 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #00 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

What can I do to fix this error?

Someone changed my php version for my magento 2 website to 5.6 and I changed it back to 7.0 and now I'm getting this error when I try to run the major magento commands such as compile and system:upgrade

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') #1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() #5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') #6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

What can I do to fix this error?

Someone changed my php version for my magento 2 website to 5.6 and I changed it back to 7.0 and now I'm getting this error when I try to run the major magento commands such as compile and system:upgrade

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') 1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') 4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() 5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') 6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: 0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

What can I do to fix this error?

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') #1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() #5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') #6 {main}

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php)PHP Fatal error: Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405) Uncaught Error: Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...')Class 'Cli' not found in #1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driverbin/File.php(403)magento: Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403)31 Stack trace: Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #3#0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Consolebin/CompilerPreparation.php(68)magento on line 31

Fatal error: Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...')Uncaught Error: Class 'Cli' not found in #4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Consolebin/Cli.php(74)magento: Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment()31 Stack trace: #5#0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') #6 {main} on line 31

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') #1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() #5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') #6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

The file "/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/var/www/vhosts/ooples.com/httpdocs/var/generation/Composer/Console/ApplicationFactory.php): Permission denied#0 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/vhosts...') #1 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #2 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #3 /var/www/vhosts/ooples.com/httpdocs/setup/src/Magento/Setup/Console/CompilerPreparation.php(68): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/var/www/vhosts...') #4 /var/www/vhosts/ooples.com/httpdocs/lib/internal/Magento/Framework/Console/Cli.php(74): Magento\Setup\Console\CompilerPreparation->handleCompilerEnvironment() #5 /var/www/vhosts/ooples.com/httpdocs/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI') #6 {main}

PHP Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/vhosts/ooples.com/httpdocs/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/vhosts/ooples.com/httpdocs/bin/magento on line 31

Source Link
DarthVegan
  • 717
  • 8
  • 18
  • 33
Loading