Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was working on my home server remotely and wanted to make some changes to my .htaccess. I could not see this file using my FTP(filezilla) and thought there was none there. I decided to upload one I had in my computer to my server in public_html and edit it.Although the upload was successful per FZ, this file is not listed anywhere, even when I physically access the server.

It looks like it is being hidden. The main problem is that after this, now I get the following error message and cannot access my test site:

You don't have permission to access / on this server.

If I access my server and DISABLE SELINUX or make it PERMISSIVE, my pages start working as normal. If I make it ENFORCING my webpage becomes unavailable and I see the error listed above.

Questions:

  1. First of all, how can I make this .htaccess visible in a CentOS 5.6 system?
  2. Will I run into Security Risks if I leave my server setup as PERMISSIVE?

Thank you all,

share|improve this question
    
Can you provide the true path to where you installed your website (I.E /var/www/html) –  Matthew Ife Feb 10 '12 at 21:25

2 Answers 2

Filenames starting with a . are hidden by default. Show all files in the directory with ls -a.

Disabling SELinux isn't necessarily a risk in itself, but it's disabling one of your system's layers of security - if possible, find and fix the root cause instead of the quick-fix. What's in the .htaccess file, and are there any pertinent errors in the Apache error log?

share|improve this answer

Will I run into Security Risks if I leave my server setup as PERMISSIVE?

Sure. I mean, that's why SELinux exists -- to mitigate the security risks to your system if an application is compromised. For example, in your current situation, if someone was able to compromise the Apache process and get a shell on your system as the apache user, they would still be unable to access user data, even if it was publically readable.

While life is often easier with SELinux disabled, leaving it on and properly configuring your system can result in a substantially enhanced level of security.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.