easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

File / Folder Owner permission

Open hchouhan opened this issue 12 years ago • 12 comments

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."

hchouhan avatar May 06 '14 16:05 hchouhan

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 avatar May 06 '14 17:05 aronwp

@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.

hchouhan avatar May 06 '14 17:05 hchouhan

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?

hchouhan avatar May 06 '14 20:05 hchouhan

This has always worked for me on all servers I've had sudo chown -R www-data:www-data /var/www

shaneholloman avatar May 06 '14 22:05 shaneholloman

@shaneholloman @aronwp Thanks guys. I have updated the question. Can you please let me know if you faced similar issues?

hchouhan avatar May 07 '14 00:05 hchouhan

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 avatar May 07 '14 00:05 hchouhan

@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

MiteshShah avatar May 07 '14 05:05 MiteshShah

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 avatar May 07 '14 11:05 hchouhan

@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 :(

MiteshShah avatar May 07 '14 11:05 MiteshShah

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.

hchouhan avatar May 07 '14 12:05 hchouhan

@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).

gagomap avatar Nov 15 '15 14:11 gagomap

i have fixed it by added these lines sshd config file:

Match User www-data
PasswordAuthentication yes

gagomap avatar Nov 15 '15 16:11 gagomap