HTML update help request

General support questions
Post Reply
nicknick
Posts: 3
Joined: 2019/03/21 10:42:34

HTML update help request

Post by nicknick » 2019/03/21 11:07:40

Hi everyone. I’m newbie in this matter, so I apologise in advance if my help request is seems stupid for you. My problem in few words. My static web page running on Centos 6.5 server. As I needed to update few things – address, emails, etc. I copied domain folder from VAR/www/ and edited it with Notepad++ on my Windows10 PC. After that I renamed VAR/WWW/domain to VAR/WWW/domainold and saved with USB flash drive already updated domain folder back to the server. Unfortunately it didn’t work – I’ve got error 403 and 404. When I swap the folder names back to original (domain to domainnew and domainold to domain) it started working again. Please advise. Thank you for your help

User avatar
TrevorH
Forum Moderator
Posts: 26292
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HTML update help request

Post by TrevorH » 2019/03/21 13:35:21

CentOS 6.5 is more than 5 years old and is extremely dangerous to run - there have been numerous high severity security patches in the last 5 years. The latest CentOS 6 is 6.10 and is just a yum update away.

You would need to make sure that the ownership of the new directory was identical to the old one, that the permissions on it are identical, and that its selinux contexts are all the same as the old copy. Running ls -la /var/www/domain will list the directory and you can look the owner/group on the '.' entry to see the ownership and the permissions. Using ls -laZ /var/www/domain will then show you the selinux context (and restorecon -RFv /var/www/domain will set it to the correct selinux contexts).

Also be aware that using an editor on a Windows machine may well render your files weirdly as Windows and linux use different ways to indicate the ends of lines. You may need to run the dos2unix command against each modified file to correct that encoding problem.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

nicknick
Posts: 3
Joined: 2019/03/21 10:42:34

Re: HTML update help request

Post by nicknick » 2019/03/21 15:30:12

Hi, thank you for the quick response. I'll check the ownerships and permissions and I'll let you know. I think the lines are ok as the index.htm opens locally on the server without problems. The errors are appearing when accessing it from external PCs. Thank you again, I'll keep you updated.

nicknick
Posts: 3
Joined: 2019/03/21 10:42:34

Re: HTML update help request

Post by nicknick » 2019/03/22 12:54:29

the problem was with the permissions. It's working now. Thank you for yor help

Post Reply