I am trying to install an extension on the store but when i visit the Magento Connect from admin panel its going to and Error page how to fix it.
I have tried by setting permission to download folder 755 and index.php t0 664 but still the error present.
FILE PERMISSION:
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo chmod o+w var app/etc
sudo chmod 550 mage
sudo chmod -R o+w media
And if i delete my htaccess file then Magento connect works fine but the store stopped working in this case
Please help me on this issue.
It's seems like your .htaccess file is blocking something. Replace that file from default installation of magento. If you want to know the issue please post your .htaccess code here.
Related
I use Docker for my project. After installing the 2.2.6 package with sample data, it gives me problems like the following when I execute php bin/magento cache:clean
The file "/var/www/html/src/generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php" cannot be deleted Warning!unlink(/var/www/html/src/generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php):
No such file or directory
The generated/code folder can not be deleted and I have to restart my computer then it does let me delete the folder
I use php 7.1.22 , percona 5.6.39 and docker Version 18.06.1-ce-win73 (19507)
This happens due to insufficient permissions on the project folder and files.Also www-data must be owner of the project if using Apache as web-server.
Please execute commands given below:--
sudo chown -R www-data:www-data [path to magento directory]
navigate to root of your magento project
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chmod u+x bin/magento
An important mania for people who offer their help is to think that all systems are the same.
www-data is the user as long as there are conditions, which many will not meet, because they prefer to use nginx + php-fpm instead of the generalist model.
Other times, included in that model is not the user running Appache, nginx or in the end, php, is www-data.
So the most correct answer is not:
Change the owner of the entire magento folder to www-data
Neither give permissions 777, this is the most common of all the aberrations in the network.
Lo mas correcto sería
Who executes the process you write in the magento directory?
PHP writes as user or globally?
I have consulted the configuration of my php (php, php-fpm, etc.) to verify which user is the one that executes the operations?
Once we have that data then if we can execute
sudo chown -R <user_correct>: <group_correct>
And please, stop paying attention to those who always write chmod -R 777
Or one day they will wake up without their site in a normal way but full of infections that are hardly curable.
Installing magento 2 from the command line of the container in Docker solves the problem of writing permissions in Windows for me
You may need to adjust the parameters:
bin/magento setup:install --base-url=http://local.shop.magento2.com \
--db-host=db_magento2 --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=magento --admin-lastname=magento --admin-email=user#example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=Europe/Madrid --use-rewrites=1
Just in case anyone stumbles upon this:
Add the following to your docker file
RUN echo "root:root" | chpasswd
This will allow you to switch to root and run chown
su root
password:root
chown -R user:group /folder
I moved a WordPress site to our VPS. In admin I am asked to update plugins, if I do that I am prompted for FTP info. As we don't run FTP on the server this is not possible.
I then changed the the permissions of all of the files to apache:apache using:
chown -R apache:apache *
This fixed the issue and WordPress can now update the files, however, now I cannot edit the files using filezilla. I also tried changing ownership to:
chown -R myuser:apache *
So that I can edit the files but give apache group access. Now I can edit the files with filezilla but no longer update items in WordPress.
So, what is the correct way to go about this giving me write access on file level but still giving WordPress access to update the files?
Seems file permission issue.
cd wordpress
sudo find . -type d -exec chmod 0755 {} \;
sudo find . -type f -exec chmod 0644 {} \;
and following
define( 'FS_METHOD', 'direct' );
in wp-config.php
or
sudo chown -R www-data:www-data wordpress
From WHMPanel, Software, Multi PHP Manager, enable Enable PHP-FPM to fix file permissions issues.
This prevents the popup appearing asking for FTP credentials.
I have moved my website project to a linux environment and I have an issue assigning permission.
Command that I run:
sudo chown -R admin01:admin01 /var/www/html/counsyl
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
If I set
sudo chown -R admin01:admin01 /var/www/html/counsyl
where admin01 is the username, and this user is not root. I am able to edit the files and folders but the issue is I can't add images or upload plugins etc from the WordPress admin area.
If I run the following command
sudo chown www-data:www-data -R *
It allows me to upload images or plugins etc. But now I am unable to edit the files etc from admin01 account.
So what might be the correct permission so that I can edit the files with admin01 user(not root) and at the same time upload files and folders from the WordPress admin area? I will appreciate if you can give some explanation also so that I understand what I am doing wrong.
Permissions of folders and files inside WordPress folder after running the command
sudo chown admin01:www-data -R /var/www/html/counsyl
Have you tried with 755 permission mate?
chmod -R 755 /var/www/html/counsyl
I think above will help you
Try adding both owner as admin01 and user as www-data. This will help you:
sudo chown admin01:www-data -R /var/www/html/counsyl
Try this, it should work. Structure is like
chown -R USERNAME:GROUPNAME /PATH/TO/FILE
Thank you
Good day folks,
I was trying to update my wordpress site and i have this error:
Unpacking the update… Could not create directory. Installation Failed
After googling, i have found a solution that says:
Web Server Ownership
The first level is actually to make sure that your web server has ownership over the directories:
chown -R www-data:www-data your-wordpress-directory
Directory Permissions
The second level is also required – you must make sure that the directory permissions are properly set:
sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;
Could anyone guide me how to perform those tasks?
Regards
I set up my free DevBox (Ubuntu, PHP) that I get from Codenaywhere and followed the installation instructions on the Laravel site.
I set up an htaccess in the root directory so it points to /public when I go to the domain.
I am getting a 500 error, but when I put in and index.html file in public it worked. Seems like it's not liking the index.php.
Why am I getting this error?
Got it working, had to set the proper permissions.
sudo find ./ -type d -exec chmod 755 {} \;
sudo find ./ -type f -exec chmod 644 {} \;
sudo chown -R www-data:www-data public
In that order, hope it helps.