Author Topic: SOLVED - can´t get over the temp and logs directory access  (Read 6167 times)

Offline ToZo

  • Newbie
  • *
  • Posts: 2
SOLVED - can´t get over the temp and logs directory access
« on: October 12, 2012, 10:16:37 AM »
Hello,
after truly hours of researching and trying everything I have no idea anymore what it could be:
The installer shows me "temp/:  NOT OK(not writeable for the webserver)" and the same for the logs/ directory.
I checked
- the user under which Apache is running (apache) and used chmod -R apache:apache for both directories
- I checked that no .htaccess file within them is blocking it (first with, no without .htaccess in logs/ and temp/), no effect
- I checked the access rights, modified them first with chmod g+w, finally giving 777 to the directories, no effect
- I modified the printout of the installer to see the total filepath that is used in the is_writable function, and spit out the user under which it is executed to triple check, all is correct. The filepath is also within the root that is specified by the roundcubemail.conf together with the alias.

I am really, really running out of ideas, asked a colleagues to look at it to make sure I am not blind to the simplest thing.

Note, I am using 0.8.2, but had the same problem when trying 7.x before. I am running it under CentOS.
So I am stuck at that point and cannot go on trying the IMAP connection (which fails, permission denied but I guess because of the file access).

There are several very similar questions, some were desperate as I am now, but the only answers that I found where standard statements.
Did anyone have the same problem and overcame it with something not listed here? Could it be a PHP configuration problem? I read something about CGI but no idea if that really applies here.
File access in .htaccess ?? (Checked the docs, can´t find a error)

Thanks for any hint that helps getting me out of that situation!

Cheers,
Toni
« Last Edit: November 13, 2012, 03:36:00 PM by ToZo »

Offline ToZo

  • Newbie
  • *
  • Posts: 2
SOLVED Re: can´t get over the temp and logs directory access
« Reply #1 on: November 13, 2012, 03:33:30 PM »
SOLVED

I found the problem .... SELinux !

Actually, I was not even aware that this layer of security exists (CentOS 6) and is switched on by default after CentOS installation.

After a quick temporary try to set it to "permissive" mode, suddenly everything worked. As the server is within the company and firewalls, I did not bother understanding the right SELinux configuration and simply disabled it.

FYI:
Temporary switching on/off with
/usr/sbin/setenforce — Modifies in real-time the mode in which SELinux runs (this is for CentOS)
For example:
setenforce 1 — SELinux runs in enforcing mode.
setenforce 0 — SELinux runs in permissive mode.

Permanent:
Modify the SELinux configuration file

More details are here: http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-selinux.html