Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web update permissions access #1355

Closed
paul-mesnilgrente opened this issue Nov 4, 2016 · 9 comments
Closed

Web update permissions access #1355

paul-mesnilgrente opened this issue Nov 4, 2016 · 9 comments
Milestone

Comments

@paul-mesnilgrente
Copy link

paul-mesnilgrente commented Nov 4, 2016

Hello everyone,

I have used your script in the README to install FreshRSS last week. The only difference is that I have placed the symlink in /var/www instead of /var/www/html/ and I use an apache virtualhost :

<VirtualHost *:80>
    ServerName ...
    DocumentRoot /var/www/FreshRSS

    ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
    CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =...
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName ...
    DocumentRoot /var/www/FreshRSS

    ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
    CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
SSLCertificateFile /etc/letsencrypt/live/...
SSLCertificateKeyFile /etc/letsencrypt/live/...
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

</IfModule>

The problem is that when I click on "Check the updates", an error message prints that /usr/share/FreshRSS is not accessible by the HTTP user.

So I have run again that line sudo chown -R :www-data . && sudo chmod -R g+r . && sudo chmod -R g+w ./data/ but the problem is not solved. If you have an idea...

Thank you very much.

PS: I am on ubuntu, with FreshRSS 1.5

@subic
Copy link

subic commented Nov 4, 2016

You also have to chmod g+w on the application folder (/usr/share/FreshRSS in your case) to allow the webuser group write access to the installation directory. I personally only do this while upgrading and reduce the privileges after (chmod g-w on the application folder).

@paul-mesnilgrente
Copy link
Author

This work fine, but this not only on the /usr/share/FreshRSS but recursively too.
So the script is

sudo chmod -R g+w .
# make the update with the web interface
sudo chmod -R g-w .
sudo chmod -R g+w ./data/

@Alkarex
Copy link
Member

Alkarex commented Nov 4, 2016

@paul-mesnilgrente can you please show the rights of /var/www/FreshRSS and /usr/share/FreshRSS ?

@Alkarex
Copy link
Member

Alkarex commented Nov 4, 2016

And depending on your Apache config, see also FollowSymlinks https://httpd.apache.org/docs/2.4/mod/core.html

@paul-mesnilgrente
Copy link
Author

paul-mesnilgrente commented Nov 4, 2016

The problem was solved with the script I gave... But if you want it :

rwxrwxrwx  1 root     root   21 oct.  23 14:28 FreshRSS -> /usr/share/FreshRSS/p/
drwxr-xr-x   11 root www-data  4096 nov.   4 15:49 FreshRSS/

@Alkarex
Copy link
Member

Alkarex commented Nov 4, 2016

Ah, ok, very good :-)

@subic
Copy link

subic commented Nov 4, 2016

I think the problem is when installing FreshRSS in the share folder and only symlinking the "p" directory the application folder in usr is not group writable. The referenced installation instructions presume that the web user has access to the whole directory (as would be the case when installing the whole app in web directory but is not when using symlink to /usr/).

@Alkarex
Copy link
Member

Alkarex commented Nov 4, 2016

Sorry, I read a bit too fast earlier today and I did not see the fact that the problem was for updates. Indeed, a Web update requires setting the rights as you did. Another thing we should document better...

@Alkarex Alkarex changed the title permissions access Web update permissions access Nov 4, 2016
@Alkarex Alkarex added this to the 1.7.0 milestone Nov 4, 2016
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Nov 4, 2016
@Alkarex
Copy link
Member

Alkarex commented Nov 4, 2016

I have made a little update in the read-me. Comments welcome #1356

Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Nov 5, 2016
@Alkarex Alkarex modified the milestones: 1.7.0, 1.6.2 Dec 21, 2016
javerous pushed a commit to javerous/FreshRSS that referenced this issue Jan 20, 2020
javerous pushed a commit to javerous/FreshRSS that referenced this issue Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants