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

Configuration Error RSS Bridge does not have write permission - Brand New to Coding #2159

Closed
danemaster00 opened this issue Jun 12, 2021 · 13 comments
Labels
Bug-Report Confirmed bug report

Comments

@danemaster00
Copy link

So Im a new to github / VSCode / and Cloud Hosting Services but maybe someone can help with this bug im having.

So initially I tried executing this github package by using heroku, and it worked!

However I wanted to make a custom PHP bridge and add it to the /bridges/ directory.. but I just couldnt figure out how to edit the backend files on heroku... it seemed to only host exactly what you all have on this repository (which I cannot edit) so I gave up on heroku.

So Then I looked up vercel and it was pretty nice... but it dosent seem to support the php framework like heroku... so what I did was on vercel I installed this PHP framework addon by Juicyfx at https://github.com/juicyfx/vercel-php

Now I tried to read the readme but that jargon is way over my head, so I gathered from it that aslong as I link the repository, I can deploy this new app called vercel+ php

and in order to execute my php code i just have to add any php package to the /api/ directory and aslong as index.php shows up, I can deploy it.

so I made my own github repository copy of rssbridge, and literally copied and pasted these files to the /api/ directory and then I deployed it.

so when I go on vercel and deploy the app, it takes me to the url. then I just amended the url to have /api at the end, and its launching the rssbridge... but maybe because vercel or the juicyfx php framework is deploying it, I am getting this error

RSS-Bridge does not have write permissions for /var/task/user/api/lib/../cache/!

does anyone know how to fix it? I really love vercel and I would love to get this working on that site if someone has a workaround

@danemaster00 danemaster00 added the Bug-Report Confirmed bug report label Jun 12, 2021
@Bockiii
Copy link
Contributor

Bockiii commented Jun 15, 2021

If you only want your own bridge, fork the original repo and add the bridge to the bridges folder. The deploy your repo to heroku using the button.

Or: fork the repo, create a new branch ( yourbridge), add your new bridge and then create a pull request to this repo. Then your bridge can be used by everyone

@em92
Copy link
Contributor

em92 commented Jun 16, 2021

does anyone know how to fix it?

When I played with heroku in 2016, project directory was mounted as readonly. Pretty sure same happens in vercel.
That cache directory is used to store cache as files. You can try to switch cache method to memcached. See config.default.ini.php for details.

@danemaster00
Copy link
Author

OK , after searching around I found 2 tools which just do an inspect element search and create an RSS feed reader based on the parameters. These function extremely well as a "catch all" tool, which is programed by the user rather than specifically for a URL.
for reference please see
fetchrss.com and reed43.com

Is there a bridge does this function on a URL, where I can input the variables like we do on these bridges, but instead the variables are start and stop CSS identifiers ?

@Bockiii
Copy link
Contributor

Bockiii commented Jun 17, 2021

I feel like you're going waaaay around the bend for an easy solution.

  1. Fork this repo
  2. Create your bridge in the bridges folder
  3. Create a whitelist.txt in the base of the repo (where the whitelist.default.txt is)
  4. Add your new bridge to that whitelist
  5. Deploy to heroku

If you're not firm in the bridge generation: What site do you want to create an rss feed for? Maybe I'll give it a swing.

@danemaster00
Copy link
Author

I feel like you're going waaaay around the bend for an easy solution.

  1. Fork this repo
  2. Create your bridge in the bridges folder
  3. Create a whitelist.txt in the base of the repo (where the whitelist.default.txt is)
  4. Add your new bridge to that whitelist
  5. Deploy to heroku

If you're not firm in the bridge generation: What site do you want to create an rss feed for? Maybe I'll give it a swing.

well the reason I posted my comment on 6/17/2021 is because I would like 1 bridge that is dynamic.

1 bridge that I can use no matter how many URLS I want to filter, and no matter how many stylistic revisions that site undergoes.

I appreciate you giving it a swing, but if I give a URL I would be receiving a static code / algorithm for a static site. and if any changes occur, then I would have to go back and revise it :(

This is why im pretty inlove with fetchrss.com and reed43.com, because the way they structured it works with any URL that i can inspect element and filter the CSS. however Im allergic to the cost structure XD.

so I was wondering if there is a way to make a catch all bridge. one with variables such as Site URL, Start CSS identifier #1, End CSS Identifier #1, and RSS output tag #1 (link / image etc).

and then once these variables are filled out, it goes to the page, and searches the css and outputs the data inbetween the start and end identifers.

this was if the URL changes, or if the coding changes, all I have to do is update my URL, or update my CSS identifiers. That would be AWESOME! and then deploy on my heroku so I always how the power of it!

@Bockiii
Copy link
Contributor

Bockiii commented Jun 17, 2021

Thats probably not going to happen. Every site, every content is different. Check the bridges in the source for how much work needs to go in to generate an rss feed for some of the sites. Almost no site can be done correctly by just setting those 3 identifiers. That's why there are dozens of custom bridges ;) That's also why fetchrss has you selecting all the things manually as well. It can't automatically assess what's the content.

Also, css may not be the identifier of that content. Could be div tags. Could be js code. Could be X. Diversity is the reason for the amount of bridges.

So, if you want a specific site, I may be able to help. If you're looking for a wonder-solution, this is not it ;)

@danemaster00
Copy link
Author

ahh I see and appreciate your advice, but do you think there is a way to make a bridge where I can select things manually in the same way that they do it on fetchrss by setting a bridge that only filters the HTML / CSS elements that I input?
and if a website uses js or X instead, well I can just accept that that would have to be a seperate bridge project?

@Bockiii
Copy link
Contributor

Bockiii commented Jun 17, 2021

The wysiwyg editor: 100% no.

Also: You have no idea what fetchrss is filtering for. It's a blackbox as far as I can see, so it could be any of the above or a combination.

As for the css question. Yes... in theory thats possible probably. The problem is: You will create a "general" bridge that is only valid for very specific use cases. What about inline ads? Category filtering? Limitation of preview content? Image manipulation? Formatting cleanup?

There are so many things going on the in depths of each bridge for each site, you will never be able to do all that through input parameters.

Okay... never say never, but I highly doubt that the "general" solution will be applicable to more than a few percent of all sites.

@danemaster00
Copy link
Author

OK however I would like to make a case for this creation,

I would like to bring up a point that if this "general css / html" bridge was to be made" I would rephrase the statement of "The problem is: You will create a "general" bridge that is only valid for very specific use cases... applicable to more than a few percent of all sites."

but rather that this bridge would only be valid for a "few percentage of content" on a large amount of sites... because many sites use CSS in a portion of there sites, where this bridge would only be applicable.

alternatively If I were to keep the status quo and make a bridge for 1 website URL, the same statement could be made that this bridge only works for 1 website out of the millions out there.

And if we go pure statistically speaking and look at the google trends of some of the URLS that these bridges were made for, and compare that to the amount of URLS that a general HTML / CSS bridge would be applicable for, I believe this new type of bridge would be strongly beneficial to the public?

@Bockiii
Copy link
Contributor

Bockiii commented Jun 17, 2021

Sorry, but you have a general misunderstanding of how that kind of data is presented, processed and formatted.

For only 2 examples for news sites (relatively easy content), check how much work needs to go into cleaning the data on the CNET bridge and the Reuters bridge. How would you want to do that with a few parameters? The alternative is that the content looks vastly different from what you would want and thus, you dont use the bridge.

Also, what about nested tags? What about string building?

How would you form a query like $values = getContents(self::URI . ($user ? '/user/' : '/r/') . $name . '.json') (from the reddit bridge) in parameters?

It's not that simple. Thats why many many people work on many many bridges.

@Bockiii
Copy link
Contributor

Bockiii commented Jul 28, 2021

@danemaster00 btw, I was wrong, there actually is a bridge kinda like this already in rss-bridge (that I wasn't aware of tbh :) ) . Check the Xpath bridge and see if that works for you.

@Dylan700Manes
Copy link

sudo git clone https://github.com/RSS-Bridge/rss-bridge;

apt --yes install php*.mbstring libapache2-mod-php.* php*.-xml php.*-curl;

nano /etc/php/*/apache2/php.ini;
;extension=mbstring
;extension=simplexml
;extension=curl
systemctl restart apache2
sudo chown -R www-data:www-data /var/www/html/rss-bridge;
sudo find /var/www/html/rss-bridge -type f -exec setfacl -mu:www-data:rw -m o::--- {} ;

sudo find /var/www/html/rss-bridge -type d -exec setfacl -d -mu:www-data:rwx -mo::--- {} ;

sudo find /var/www/html/rss-bridge -type d -exec chmod g+x {} ;

#https://askubuntu.com/questions/767504/permissions-problems-with-var-www-html-and-my-own-home-directory-for-a-website

@dvikan
Copy link
Contributor

dvikan commented Mar 26, 2022

chmod o+w ./www/cache

@dvikan dvikan closed this as completed Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug-Report Confirmed bug report
Projects
None yet
Development

No branches or pull requests

5 participants