VPS FTP access to Wordpress - wordpress

I've set up a VPS with LEMP on Ubuntu 16.04 and installed Wordpress with this tutorial
How can I setup a FTP account to access my Wordpress files?

Create a new user (for FTP access) with its home directory as the web root.
E.g
useradd -m -d /var/www/html USERNAME
That will create a user with the web root as its home directory.
Then you can sort the password out:
passwd USERNAME
And then use an FTP server like vsftpd and it will work when you log in.
You might have to mess with the permissions a bit. E.g adding the user to the web server group and giving the files and folders correct permissions.
https://www.ostechnix.com/install-vsftpd-server-ubuntu-16-04-lts/
For permissions see this
Correct file permissions for WordPress
You might need to tweak the groups etc depending on what you setup.

Related

Grant WordPress permenant access to Web Server

I have a WordPress website that has been installed onto a Linode server. Every time I attempt to install/update a theme or plugin, I am presented with this screen:
I cannot connect to the server via this screen as the server requires a SFTP connection. How can I stop this screen from being displayed? Is it possible to grant WordPress permenant access to my web server?
It's a permissions issue, you need to run the following command:
sudo chown -R www-data:www-data /var/www

Filepermission in WordPress not working well

I've a problem with my WordPress. When I'll upload a media file and W3 Total Cache gives a error with the filepermissions.
When I login with SSH and change the group from example user:user to apache:apache
sudo chown -R apache:apache wp-content
Everything is fine. W3 Total Cache gives no error and the media upload will work fine. But when I'll change with FTP a file, there is a error that I have no permission to edit the file. When I'll change it back to user:user the errors return in WordPress W3 Total Cache and I can't upload with media
This is with all users on my server. Is there a way to change this, so I have permissions in WordPress en with a external FTP program like Filezilla?
You could change it to user:apache permission. Set user group and apache user. It allow Apache to work with this files and allow your FTP client work with same files too.
You could use chrooted ftp using sftp. It's pretty logical to have such issues since the user and group for your ftp user are different than the user/group for the user under which the web server runs

Is there a better solution rather than changing wp-content folder persmission to 777 to prevent asking me to put ftp parameters?

I have a running wordpress website and the only issue I have is that each time I want to save an update it's asking me to enter my ftp password.
Is there a better solution to remove this popup without changing wp-content folder permission to 777?
I have run into this issue when the files on my web server are configured with the wrong owner or group.
From the WordPress codex:
Typically, all files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should never be owned by the webserver process itself (sometimes this is www, or apache, or nobody user).
https://codex.wordpress.org/Changing_File_Permissions
This is something that you will need to resolve on your web server if you know your user and group. Your username is likely the same as your FTP user.
chown -R user:group /path/to/wordpress
If you are on a shared hosting environment you will need to contact your host so that they can fix this problem.
You should also avoid using 777 permissions on your folders. Folders should be 755.

FTP permissions differ from client to wordpress frontend

Running Centos 6, apache, MySQL and vsftpd. I am trying to upload a plugin to WordPress via its web frontend. I made a user on centos and vsftpd that would coordinate, added them to the same group (apache:apache) and but when I try and upload it I get the unpacking the package, could not create directory error. I've change permissions from as the come to 777 (w/ -R) as well as checked that user groups are in sync. I've even gone and changed the user and group to make them the same as the login for the FTP. Here is the issue. If I login via a direct FTP client or over CLI, I don't have any issues and I checked that the users are the same, permissions, etc. I even added define('FS_METHOD','direct'); to give it a go. All to no avail. I'd really like your thoughts. Hosted here so full root access is not an issue.
Try the following - usually works:
# chown apache:apache {path_to_webroot} -R
# chmod 755 {path_to_webroot} -R

WordPress can't upload any images to Webserver on AWS Linux

I have setup my first ever AWS instance of Linux and installed Apache and MySQL. Put WordPress on it, and got everything installed through FTP, although, I can't seem to upload files within WP itself. That includes new plugins and media uploads.
I have checked the perms of the folder 'wp-content' multiple times and set them to 777 and 775 through both FTP and SSH.
I have checked multiple tutorials and fixes for this but none seem to work. I have created a new SSH/FTP user for my Linux install but WordPress does not like private key files and just wants passwords.
I need help! I don't know what to do next and I don't want to mess this one up.
For debug, I would:
Lock down the AWS security zone to allow HTTP/S access from your IP only
At the Linux cmd prompt:
sudo chmod -R /var/www/html 777
(this unlocks your top-level dir to make it writeable), then try uploading through WP again. If that solves the problem then you can lock back down with 755 when finished and change the AWS security zone back to allowing world access to HTTP/S ports.

Resources