how to move the storage directory outside of the web directory (e.g. public_html, www or htdocs).

I got install my open cart but get a security alert every time open the admin section of the cart.

it says It is very important that you move the storage directory outside of the web directory (e.g. public_html, www or htdocs).

gives me the option to do automatic or manual but when I do automatic it fails how to do this correctly I would really appreciate any help.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The reason that it fails automatically is most likely because the directory is owned by a different user than the one that your webserver runs as.

For security, a web server, and many public facing applications will run a specific user, typically nobody, this is because these applications can be compromised and during a compromise the user which runs the application is the level at which the system will be compromised.

As a result, if your webserver is compromised at worst only files that are owned by “nobody” will be potentially affected, or files that are read/write accessible by everyone.

Depending on how you installed your cart, it is likely that it was installed by your username, and as a result the directory is not owned by nobody, or the location that it is being moved to is not owned by the user which the webserver runs as.

The easiest thing to do would be to SSH into your Droplet and manually move that directory with the mv command to a different directoy.