Page 1 of 1

Problem with templates_c permissions (or so it seems)

PostPosted: Mon Aug 01, 2011 6:28 am
by jonbfl
I have set up a second Fedora installation following the guidelines (I thought).

It has an issue I can't seem to get to the bottom of.

It has an apparetnly correctly installed LAMP stack (created using yum and standard repos). I'm able to use phpMyAdmin and MySQL Workbench to contect to MySQL, so it 'seems' to be functioning correctly. I'm only using it currently to get Xataface under my belt. It is a different LAMPP stack than the one I used on the other machine.

The owner of the /var/www/html folder is root. The owner of the Apache process is apache.

[root@localhost Dataface]# ls -l
...
drwxrwxrwx. 2 root root 4096 Jul 21 14:20 templates_c
...

obviously I opted for the chmod 777 route there

Dataface 1.3rc4 2458

Installed at /xataface


Installation status Installation Incomplete: Please make the Dataface/templates_c directory writable by the web server
Templates Dir /var/www/html/xataface/Dataface/templates
Templates Compile Dir /var/www/html/xataface/Dataface/templates_c

changing the owner to apache doen't seem to help.

[root@localhost Dataface]# ls -l --group-directories-first
total 1432
...
drwxrwxrwx. 2 apache apache 4096 Jul 21 14:20 templates_c
...

same result

Dataface 1.3rc4 2458
Installed at /xataface

Installation status Installation Incomplete: Please make the Dataface/templates_c directory writable by the web server
Templates Dir /var/www/html/xataface/Dataface/templates
Templates Compile Dir /var/www/html/xataface/Dataface/templates_c

By the way - the Installer seems to work, it produces a 'good' tarball - the same as my other installation. However, when you install that tarball, create the templates_c folder and make templates_c writable (either method), then call the index page - you will get the same error -- except for the folder name is now different.

As of Xataface 1.3 all applications are now required to have its own templates_c directory to house its compiled templates. Please create the directory "/var/www/html/xataface/quotations_base/templates_c" and ensure that it is writable by the web server.

[root@localhost quotations_base]# ls -l --group-directories-first
total 16
drwx------. 4 root root 4096 Jul 28 18:27 tables
drwxrwxrwx. 2 root root 4096 Jul 31 11:28 templates_c
-rw-r--r--. 1 root root 213 Jul 31 11:01 conf.ini
-rw-r--r--. 1 root root 195 Jul 31 11:01 index.php
[root@localhost quotations_base]#

changing to apache ownership doesn't fix here either...

[root@localhost quotations_base]# chown -R apache:apache ./templates_c
[root@localhost quotations_base]# ls -l --group-directories-first
total 16
drwx------. 4 root root 4096 Jul 28 18:27 tables
drwxrwxrwx. 2 apache apache 4096 Jul 31 11:28 templates_c
-rw-r--r--. 1 root root 213 Jul 31 11:01 conf.ini
-rw-r--r--. 1 root root 195 Jul 31 11:01 index.php

Note this phrasing - "Please create the directory" - its as if the application could not see the folder, maybe its a path problem??? (although the path given is correct)

I even tried changing to user 'nobody', which is what some Apache configurations write work files to and tried CHMOD 755 for the templates_c folders.

I'm puzzled and out of ideas

thanks for any tips/fixes.
8)

PS - not discouraged - I'm going to set up Xataface on one of my VPS's and see how it works remotely.

Re: Problem with templates_c permissions (or so it seems)

PostPosted: Mon Aug 01, 2011 7:56 am
by Jean
Hello,
My templates_c folder is owned by root with 0777 as permissions.
Jean

Re: Problem with templates_c permissions (or so it seems)

PostPosted: Mon Aug 01, 2011 9:12 am
by jonbfl
Got it

SELinux was enabled

/etc/selinux/conf:

SELINUX=disabled

works right now

thanks

Re: Problem with templates_c permissions (or so it seems)

PostPosted: Mon Aug 01, 2011 11:27 am
by ADobkin
jonbfl wrote:SELinux was enabled


Good catch! SELinux has caused confusing problems like this for me several times in the past.

But rather than disabling it completely, you could set it to permissive until you complete your system configuration. That way, it won't enforce the policy, but rather warn you about violations in the logs.

Alan