File / Folder Owner permission
Hello, I finally started using EE and just need to say that I love it. It's just too easy.
UPDATE
Before installing EE, I had created a new user with root privileges. Now when I use it to connect with SFTP over SSH, I can view all folders, but unable to upload any files inside '/var/www/mywebsite.com/' or '/var/www/mywebsite.com/htdocs'.
The error I get is "Insufficient privileges to perform the operation."
I run sudo chown -R www-data:www-data /var/www/DOMAIN.com/htdocs after I upload my files and have had no problems. Make sure your files have the proper read write permissions too.
@aronwp Thanks for the quick reply. I am unable to upload anything or connect to the server via DeployHQ.com as I get access error "Insufficient privileges to perform the operation.".
I had created a separate user account to connect via SFTP on SSH. Any ideas to work around this? I prefer not to use SSH keys at the moment.
After using below command, I was able to upload files to htdocs folder. However I still cannot modify the wp-config file.
sudo usermod -a -G www-data my-user-name
I had created a new user with root privileges and can connect via SFTP over SSH but just cannot stuck with the wp-config file. Any ideas?
This has always worked for me on all servers I've had
sudo chown -R www-data:www-data /var/www
@shaneholloman @aronwp Thanks guys. I have updated the question. Can you please let me know if you faced similar issues?
I was able to fix this issue using below method but not sure if this is the right way:
sudo usermod -a -G www-data my-user-name
sudo chown -R my-user-name /var/www/mywebsite.com/*
After doing this I was able to edit files, upload new files, etc. without any errors. Can someone please verify if this is can cause any issue with EasyEngine?
@hchouhan EasyEngine used www-data user for the all the website and php
You need to reset www-data password
passwd www-data
Now login in to the server using www-data and you can modify any files no root/sudo privilege required
Hello @MiteshShah, I tried changing the password. However when now I try connecting to the server using SFTP over SSH (using CuteFTP) software, I get a "user authentication failed" error. Do I need to add this user to the root login access list?
@hchouhan Why you used cuteFTP ? First openssh server is good enough for accessing server via sftp protocol.
I'm not aware of Cute FTP and how its works :(
Hello,
I use Putty for connect via SSH, but when I need basic file dragging/dropping UI I prefer CuteFTP. It allows connecting with SFTP over SSH.
@MiteshShah : If i force login via ssh key for all user, i can't use www-data to login sftp, even i added ssh key in .ssh (in /var/www folder).
i have fixed it by added these lines sshd config file:
Match User www-data
PasswordAuthentication yes