By pbroderi31
Hello all, I did a yum update on my Development server and it updated Nginx 1.12.2.3 to Nginx 1.16.1.1. Also in the process it wrote to the index.html file.
This is of concern as if updates are run on a production server it could cause problems in that it could make the website crash as nginx appear to be writing to the public folder.
Here is how the /usr/share/nginx/html looks before the yum update versus after.
-rw-r–r-- 1 root root 2811 May 10 2019 poweredby.png -rw-r–r-- 1 root root 368 May 10 2019 nginx-logo.png -rw-r–r-- 1 root root 3700 May 10 2019 index.html -rw-r–r-- 1 root root 3693 May 10 2019 50x.html -rw-r–r-- 1 root root 3650 May 10 2019 404.html
Here is how it looks after the YUM update and reboot. lrwxrwxrwx 1 root root 20 Jan 24 18:28 en-US -> …/…/doc/HTML/en-US lrwxrwxrwx 1 root root 18 Jan 24 18:28 img -> …/…/doc/HTML/img drwxr-xr-x 2 root root 26 Jan 24 18:28 icons lrwxrwxrwx 1 root root 14 Jan 24 18:28 poweredby.png -> nginx-logo.png lrwxrwxrwx 1 root root 25 Jan 24 18:28 index.html -> …/…/doc/HTML/index.html
So the question is why is YUM/NGINX writing files to the public folder? As I said this is a concern in that it could bring the whole website down. Any help, thoughts or suggestions would be welcome.
Regards, Patrick
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
...
You should not use the default document root for any site-critical files. There is no expectation that the default document root will be left untouched by the system and there is an extremely high possibility that your site-critical data may be lost upon updates and upgrades to the NGINX packages for your operating system.
...
Avoid using default site config and file directories. Otherwise, the updates may clobber your existing files.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.