Tt-rss setting up : Startup failed


#1

I’m trying to setting up a tt-rss server on Centos 7, i’m getting this error after the database configuration :

Startup failed
Tiny Tiny RSS was unable to start properly. This usually means a misconfiguration or an incomplete upgrade. Please fix errors indicated by the following messages:

Image cache is not writable (chmod -R 777 cache/images)
Upload cache is not writable (chmod -R 777 cache/upload)
Data export cache is not writable (chmod -R 777 cache/export)
Javascript cache is not writable (chmod -R 777 cache/js)
ICONS_DIR defined in config.php is not writable (chmod -R 777 feed-icons).
LOCK_DIRECTORY defined in config.php is not writable (chmod -R 777 lock).

I tried the commands written without success.


#2

What was the error message after you tried those commands?


#3

The same. Rights seems to be applied but I get the same error in the page…


#4

Could you please post a directory listing of the applications base dir (e.g. ls -la ).


#5

[root@localhost bin]# cd /var/www/html/tt-rss/
[root@localhost tt-rss]# ls -la
total 264
drwxrwxrwx. 23 apache apache 4096 Sep 12 02:08 .
drwxrwxrwx. 3 root root 4096 Sep 12 02:29 …
drwxrwxrwx. 2 apache apache 22 Sep 11 01:06 api
-rwxrwxrwx. 1 apache apache 1272 Sep 11 01:06 atom-to-html.xsl
-rwxrwxrwx. 1 apache apache 3455 Sep 11 01:06 backend.php
drwxrwxrwx. 7 apache apache 70 Sep 11 01:06 cache
drwxrwxrwx. 8 apache apache 4096 Sep 11 01:06 classes
-rw-r–r--. 1 root root 8001 Sep 12 02:16 config.php
-rwxrwxrwx. 1 apache apache 8057 Sep 11 01:06 config.php-dist
-rwxrwxrwx. 1 apache apache 232 Sep 11 01:06 CONTRIBUTING.md
-rwxrwxrwx. 1 apache apache 35147 Sep 11 01:06 COPYING
drwxrwxrwx. 2 apache apache 4096 Sep 11 01:06 css
-rwxrwxrwx. 1 apache apache 1622 Sep 11 01:06 errors.php
drwxrwxrwx. 2 apache apache 36 Sep 11 01:06 feed-icons
drwxrwxrwx. 8 apache apache 4096 Sep 11 01:06 .git
-rwxrwxrwx. 1 apache apache 262 Sep 11 01:06 .gitignore
-rwxrwxrwx. 1 apache apache 1339 Sep 11 01:06 .gitlab-ci.yml
drwxrwxrwx. 2 apache apache 4096 Sep 11 01:06 images
drwxrwxrwx. 2 apache apache 4096 Sep 11 01:06 include
-rwxrwxrwx. 1 apache apache 10158 Sep 12 01:50 index.php
drwxrwxrwx. 2 apache apache 22 Sep 11 01:06 install
drwxrwxrwx. 2 apache apache 4096 Sep 11 01:06 js
drwxrwxrwx. 13 apache apache 4096 Sep 11 01:06 lib
drwxrwxrwx. 28 apache apache 4096 Sep 11 01:06 locale
drwxrwxrwx. 2 apache apache 19 Sep 11 01:06 lock
-rwxrwxrwx. 1 apache apache 67546 Sep 11 01:06 messages.pot
-rwxrwxrwx. 1 apache apache 805 Sep 11 01:06 opml.php
drwxrwxrwx. 37 apache apache 4096 Sep 11 01:06 plugins
drwxrwxrwx. 2 apache apache 23 Sep 11 01:06 plugins.local
-rwxrwxrwx. 1 apache apache 4945 Sep 11 01:06 prefs.php
-rwxrwxrwx. 1 apache apache 1474 Sep 11 01:06 public.php
-rwxrwxrwx. 1 apache apache 960 Sep 11 01:06 README.md
-rwxrwxrwx. 1 apache apache 10225 Sep 11 01:06 register.php
drwxrwxrwx. 3 apache apache 79 Sep 11 01:06 schema
drwxrwxrwx. 2 apache apache 4096 Sep 11 01:06 templates
drwxrwxrwx. 3 apache apache 41 Sep 11 01:06 tests
drwxrwxrwx. 2 apache apache 71 Sep 11 01:06 themes
drwxrwxrwx. 2 apache apache 19 Sep 11 01:06 themes.local
-rwxrwxrwx. 1 apache apache 6469 Sep 11 01:06 update_daemon2.php
-rwxrwxrwx. 1 apache apache 12512 Sep 11 01:06 update.php
drwxrwxrwx. 3 apache apache 4096 Sep 11 01:06 utils


#6

Actually these are a little too much of 777 :wink: Maybe you should consider removing execute rights from the files and restrict write to directories which really need it.
Apart from this, are there any errors logged in the webserver logs?

edit: shouldn’t this post be in support?


#7

Setting chmod 777 is not a good idea on all your files

What does apache error log says?

What does SELinux (ls -Z) says?


#8

This is a problem with SELinux. Disable it temporarily and see if it works then: https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/


#9

Thanks a lotfor all your answers.

It’s now working since I have disabled SELinux.
I will change rights I modified in tt-rss directory.


#10

Now that you have tested that it is SELinux (as expected), you should fix your problem and not keep it turned off! It is trivially easy to fix: just changer permissions: chcon -v --type=httpd_sys_content_t … is all you need to make it work.

Good. But change them to something that makes sense or it will stop working again…

:slight_smile: Think before you type.


#11

The context type should be httpd_sys_rw_content_t. After applying it to each folder in the cache folder I realised there was a recursive option. I haven’t tried it but I think this should work:

chcon -R -v --type=httpd_sys_rw_content_t cache
chcon -v --type=httpd_sys_rw_content_t feed-icons
chcon -v --type=httpd_sys_rw_content_t lock

It would be nice if this was added to the error message.


#12

“selinux is garbage, stop using it”? would that work?


#13

Right answer…