What Path is Magento Connect Trying to Change To After Login? - magento

At every turn, I get the error message: “Deployment FTP Error. Cannot chdir after login to:”
I successfully did my first time through connection and setup by chmod’ing my /{complete_path_to_magento_installation_dir}/downloader/ to 0777
a cache.cfg file got created in /downloader/
a connect.cfg file got created in /downloader/
I then chmod’ed /{complete_path_to_magento_installation_dir}/downloader/ back to 0755
My Magento Installation Absolute Path is: /home/abcde/public_html/magento/
My Host’s Document Root is: /home/abcde/public_html/
My Magento Connect Directories Live at: /home/abcde/public_html/magento/downloader/
Here are my settings:
Magento Connect Channel Protocol: Ftp
Preferred State: Stable
Use custom permissions: No
Deployment Type: FTP Connection
FTP Host: ftp://{mydomain.com}/
FTP Login: my ftp userid
FTP Password: my ftp password
Finally, when Installation Path: is set to (see list below) I get the error message(s):
Installation Path: {I left it blank} Error Message: Unable to read saved settings. Please check Installation Path of FTP Connection.
Installation Path: / Error Message: Unable to read saved settings. Please check Installation Path of FTP Connection.
Installation Path: /home/ Error Message: Deployment FTP Error. Cannot chdir after login to: /home/
Installation Path: /home/abcde/ Error Message: Deployment FTP Error. Cannot chdir after login to: /home/abcde/
Installation Path: /home/abcde/public_html/ Error Message: Deployment FTP Error. Cannot chdir after login to: /home/abcde/public_html/
Installation Path: /home/abcde/public_html/magento/ Error Message: Deployment FTP Error. Cannot chdir after login to: /home/abcde/public_html/magento/
Installation Path: /home/abcde/public_html/magento/downloader/ Error Message: Deployment FTP Error. Cannot chdir after login to: /home/abcde/public_html/magento/downloader/
Installation Path: magento Error Message: Deployment FTP Error. Cannot chdir after login to: /magento/
Does anyone know the secret to Magento Connect Settings?
Thanks.

I had a similar issue that I was able to fix using
from the /usr/share/nginx folder
double checked that nginx runs as nginx.
chowned everything to nginx.
chmoded directories to 775 (Has to have group write privlages)
chmoded files to 644
Commands:
sudo find . -exec chown nginx {} \;
sudo find . -type d -exec chmod 775 {} \;
sudo find . -type f -exec chmod 644 {} \;
from the /usr/share/nginx/html folder
sudo chmod -R o+w media var skin downloader
sudo chmod o+w app/etc
The same should work for apache, just chown everything to apache or noname depending on how apache is setup.

This problem lied with the Installation Path for me. For example: My site was installed on a subdomain, but the FTP user had access to the main domain and subdomains. Therefore, when it connected it needed an initial directory of "magneto" (my subdomain for this install).
I would FTP into your site (with no initial directory set in your FTP client) and make note of which folders you navigate into. That should work in many cases, although it could vary host to host.

Same problem was experienced by me :
I resolved it by doing the following changes:
777 ---------> /downloader folder
777 ----------> /var folder
777 ----------> /media folder
disabled cache
flush cache
flushed javascript,images and all other mentioned cache.
Kept installation path empty or u can add /Hopes this helps you.Good Luck.

Just put the path as "/" and it should work.

Related

Laravel - Every new day I have this error : failed to open stream: Permission denied

i tried by giving permission (775) to bootstrap/cache and storage folder - it works fine on that day but next day it gives error again with new created log file.
The stream or file "/var/www/public_html/myProject/storage/logs/laravel-2021-03-31.log" could not be opened in append mode: failed to open stream: Permission denied in /var/www/public_html/myProject/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:111
i found the solution here:
i have two users on linux server
1 : ubuntu
2 : www-data
i added ubuntu user to www-data group and same as wwww-data to ubuntu group.
so now both users can read there files,
second thing i did is -> i updated app/config/logging.php
and define the permissions (0666) for newly created log file for "daily" and "single".
This might help you:
sudo chown -R www-data:www-data /var/www/{laravel_project_name}
link:
https://dev.to/613596/permission-denied-for-laravel-8-storage-logs-solved-2021-12ld
You have permission issue in your path /var/www/public_html/myProject/storage/logs/.
Try to run the following command
Change the files/directories group to apache/nginx, I used www-data it's the default user of apache on Ubuntu (Use your http server user/group name instead of www-data)
sudo chown :www-data -R /var/www/public_html/myProject/storage/
Now change the file permission once again
sudo chmod 775 -R /var/www/public_html/myProject/storage/
You can also add UID, GID, SID to handle more efficiently

NGINX gaves 404 error after creating a symlink

My site runs on php-larvel and nginx as webserver and the root diectory is /public , everything was ok ,but when I wanted to secure my phpmyadmin login url , creating a symlink by this command in /public_html :
ln -s /usr/share/phpmyadmin/phpmyadmin-YOUR-SECRET-CODE
site went down showing 404 , and the nginx shows this error:
2019/04/07 07:09:02 [error] 4163#4163: *110 directory index of
"/home/admin/web/example.com/public_html/" is forbidden
the nginx configuration has already set to serve on /public . I don't know why it is trying to access public_html on requests .
The user that NGINX is running as must be able to access the directories its attempting to read and/or write to. In most cases, NGINX is either running as the user nginx or www-data.
We can check for the user directive in /etc/nginx/nginx.conf by running:
grep user /etc/nginx/nginx.conf
If the return of that command spits out a user, we can then change the ownership of the directories you've mentioned using chown.
chown -R user:group /insert/path/here
So if NGINX is running as www-data:
chown -R www-data:www-data /insert/path/here
If the grep command doesn't spit out a user, we can always see who owns NGINX's directories and we should be able to use that user.
Simply run:
ls -al /etc/nginx
and grab the user from the output.
As a side note, things are a bit different if you happen to be running PHP-FPM with NGINX. In that case, the directories and files should be owned by the user that the PHP-FPM process is running as.
If you are running PHP-FPM, you can cd in to the main directory and check the pool file. If you've not modified anything there for your setup, the default user for PHP-FPM is always www-data, so that should be the user who owns all files and directories.
cd /etc/php/*/fpm/pool.d/
and then:
nano www.conf

Laravel and AWS Elastic Beanstalk - File Permissions

I've created a Laravel app and deployed it to an EC2 instance using Elastic Beanstalk. Everything seems to work except that PHP can't write to the storage directory so I get this error:
Error in exception handler: The stream or file "/var/app/current/site/app/storage/logs/laravel.log"
could not be opened: failed to open stream:
No such file or directory in /var/app/current/site/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:84
This looks like a permissions problem to me, so I've tried using the instructions at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html to set the permissions.
I have one file 01permissions.config in the .ebextensions directory:
commands:
storage_permissions:
command: chmod -R 755 $EB_CONFIG_APP_ONDECK/site/app/storage
I get the following errors in server logs:
[ERROR] Command storage_permissions (chmod -R 755 $EB_CONFIG_APP_ONDECK/site/app/storage) failed
[DEBUG] Command storage_permissions output: chmod: cannot access ‘/site/app/storage’: No such file or directory
Any ideas what's going on here?
The issue was that I had ignored the logs directory so it wasn't on the server at all. It's not that the server couldn't write to it, it's that it didn't exist.
The default permissions for an instance created by Elastic Beanstalk are:
File 664
Dir 775
They are deployed and owned by the Apache user.
For anyone else with this problem... this would have worked:
container_commands:
01storage_permissions:
command: "chmod -fR 755 /var/app/ondeck/app/storage"

Joomla extension install from URL error: Archive does not exist

I am trying to install a package from URL into my local server and I am getting this error:
Error
Archive does not exist
Warning
JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\Joomla\tmp\install_53170ad5161e0
JFolder: :folder: Path is not a folder. Path: C:\xampp\htdocs\Joomla\tmp\install_53170ad5161e0
JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\Joomla\tmp\install_53170ad5161e0
JInstaller: :Install: Cannot find Joomla XML setup file
The tmp paths are correct and the remote file URL link is correct too. I've also tried by clearing the tmp folder but still does not help. The package installs correctly when the package file is uploaded.
Does anyone know what's happening?
If you are using Linux
You may need to fix the directory permissions. Check if there is any directory of which CHMOD is not 0777. If there are folders which their CHMOD value is lower than 0777 set them to 0777. After installation you have to change chmod back to 0755
Even though this post is quite old I hope that someone searching for a solution will stumble upon this question and answer:
I had the same problem when installing and updating Joomla on a Windows host, problems were related to directory permissions on various directories like "tmp", "modules" etc not being set. When I used the FTP client's chmod functionality the server responded with 504 Command not implemented for that parameter (showing in green instead of red in my FTP protocol so I ) so permissions were never changed. I had to alter the security settings using the hoster's web interface, after that installing packages worked as expected.
only for this folder:
chmod 777 /opt/lampp/htdocs
OR
project folder -
chmod 777 /opt/lampp/htdocs/project_name
in /var/www/you_site/httpdocs/configuration.php change value:
$ftp_enable = '0'; set 0 from 1

When installing a component in Joomla 3.2.1 it is giving the error Archive does not exist.

Warning
JFolder::create: Could not create directoryPath: D:\wamp
Warning: Failed to move file!
JFolder: :files: Path is not a folder. Path: D:\wamp\www\acreindia\tmp\install_5309b76219b0a
JFolder: :folder: Path is not a folder. Path: D:\wamp\www\acreindia\tmp\install_5309b76219b0a
JFolder: :files: Path is not a folder. Path: D:\wamp\www\acreindia\tmp\install_5309b76219b0a
JInstaller: :Install: Cannot find Joomla XML setup file
Error
Archive does not exist
Please check your owner and usergroup of folder.
For Apache it must be www-data for owner and usergroup.
Log in to your server via ssh --> Go to your web directory like /var/www / your Joomla kit Write command here as :-> ls-alt
This will show all details.
If its not www-data then place this command.
sudo chown -R www-data:www-data /var/www
Folders must have 755
Files must have 644 permission
Else you can check server error.log or access .log at /var/log/apache2/

Resources