/tmp/runtime should be writable by the webserver

More
1 year 2 months ago #142037 by tomhklab
tomhklab created the topic: /tmp/runtime should be writable by the webserver
Hi I am trying to install LimeSurvey 2.52 (latest) onto a Centos 7 VM.
I got stuck after setting permission to specific folders in my limesurvey directory.
whenever I try to navigate to http://10.100.100.22/limesurvey/ (10.100.100.22 being the vm's ip), i get this message:
/var/www/html/limesurvey/tmp/runtime should be writable by the webserver (766 or 776).
I found post with similar issue and that applying permission 777 would help.
so I change the ownership from root to apache and set permission to 777 with recursive to the /tmp directory
however I am still getting this message.
Anyone can help me with this?

Here are the permission setting within the limesurvey directory, if it helps.

[root@limesurvey limesurvey]# ls -l
total 60
drwxr-xr-x. 2 apache root 38 Sep 20 12:16 admin
drwxrwxrwx. 15 apache root 4096 Sep 20 12:16 application
drwxr-xr-x. 3 apache root 4096 Sep 20 12:16 docs
drwxr-xr-x. 15 apache root 4096 Sep 20 12:16 fonts
drwxr-xr-x. 19 apache root 4096 Sep 20 12:16 framework
drwxr-xr-x. 4 apache root 4096 Sep 20 12:16 images
-rw-r--r--. 1 apache root 7629 Sep 20 12:16 index.php
drwxr-xr-x. 6 apache root 51 Sep 20 12:16 installer
drwxr-xr-x. 90 apache root 4096 Sep 20 12:16 locale
-rw-r--r--. 1 apache root 1140 Sep 20 12:16 phpci.yml
drwxr-xr-x. 4 apache root 49 Sep 20 12:16 plugins
-rw-r--r--. 1 apache root 1605 Sep 20 12:16 README.md
drwxr-xr-x. 4 apache root 4096 Sep 20 12:16 scripts
drwxr-xr-x. 11 apache root 4096 Sep 20 12:16 styles
drwxr-xr-x. 5 apache root 4096 Sep 20 12:16 styles-public
drwxr-xr-x. 5 apache root 4096 Sep 20 12:16 templates
drwxr-xr-x. 3 apache root 20 Sep 20 12:16 themes
drwxr-xr-x. 34 apache root 4096 Sep 20 12:16 third_party
drwxrwxrwx. 5 apache root 63 Sep 20 12:16 tmp
drwxrwxrwx. 6 apache root 83 Sep 20 12:16 upload
[root@limesurvey limesurvey]# ls -l ./tmp/
total 4
drwxrwxrwx. 2 apache root 23 Sep 20 12:16 assets
-rwxrwxrwx. 1 apache root 255 Sep 20 12:16 index.html
drwxrwxrwx. 2 apache root 23 Sep 20 12:16 runtime
drwxrwxrwx. 2 apache root 23 Sep 20 12:16 upload

Please Log in to join the conversation.

More
1 year 2 months ago #142045 by jelo
jelo replied the topic: /tmp/runtime should be writable by the webserver
Is this a fresh installation of CentOS7? Or did you already installed other PHP scripts without issues?
If there isn't a real permission issue it be SELinux.
Is SELinux on or off?
idroot.net/tutorials/how-to-disable-selinux-on-centos-7/
The following user(s) said Thank You: tomhklab

Please Log in to join the conversation.

More
1 year 2 months ago #142701 by tomhklab
tomhklab replied the topic: /tmp/runtime should be writable by the webserver
thanks Jelo. I change selinux to permissive, and it works now.

Please Log in to join the conversation.

More
9 months 17 hours ago #150108 by Kevin
Kevin replied the topic: /tmp/runtime should be writable by the webserver
This worked for me:

blog.lysender.com/2015/07/centos-7-selin...file-no-matter-what/

ls -Z /var/www/public_html/survey/tmp/
drwxr-xr-x. apache ***** unconfined_u:object_r:httpd_sys_content_t:s0 assets
-rw-r--r--. apache ***** unconfined_u:object_r:httpd_sys_content_t:s0 index.html
drwxr-xr-x. apache ***** unconfined_u:object_r:httpd_sys_content_t:s0 runtime
drwxr-xr-x. apache ***** unconfined_u:object_r:httpd_sys_content_t:s0 upload

ls -Z /var/www/public_html/survey/upload/
ls -Z /var/www/public_html/survey/application/config/

chcon -t httpd_sys_rw_content_t /var/www/public_html/survey/tmp -R
chcon -t httpd_sys_rw_content_t /var/www/public_html/survey/upload -R
chcon -t httpd_sys_rw_content_t /var/www/public_html/survey/application/config -R

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!