N
N
Natasha0002021-03-15 14:54:50
Apache HTTP Server
Natasha000, 2021-03-15 14:54:50

How to implement access to the file only for the plugin or WordPress itself on the same host (server)?

I am currently working on a WordPress site using the WP All Import/Export PRO plugin. I have a debian server. The site is on the same server as FTP. So it's all one car.
WP All Import cannot connect via FTP.
It looks like the FTP loopback host is being blocked.
But in this regard, I’m completely new and I don’t know how to check it and what to prescribe where.
Actually the question is:
How to place the file so that only the plugin or WordPress itself has access to it (and not anyone) on the same server?
(simply placing it in the host folder is not suitable, since this file will be available to anyone via a direct link)
Please help solve this problem

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
unseriously, 2021-03-15
@unseriously

In order for WordPress to have access to the file, you need to:
1. Make the WordPress user the owner of the file: sudo chown wordpress:wordpress <path-to-file> - I don’t remember exactly here, but it seems that WordPress creates a user named wordpress
2. Give the owner all rights to the file, and nothing else:sudo chmod 700 <path-to-file>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question