Coder Social home page Coder Social logo

Don't put poll data into webroot about dudle HOT 6 OPEN

fonk avatar fonk commented on August 15, 2024
Don't put poll data into webroot

from dudle.

Comments (6)

clawoflight avatar clawoflight commented on August 15, 2024

You could solve most of that with a plain symlink for now, right?

from dudle.

fonk avatar fonk commented on August 15, 2024

I don't think so, because the folders for the polls in the webroot are named like the poll itself - and because I don't know which polls get created, I can't symlink the folders beforehand :-)

from dudle.

mhdev90 avatar mhdev90 commented on August 15, 2024

+1

@fonk Thx for the Docker Image!

from dudle.

josch avatar josch commented on August 15, 2024

@fonk no you have to do the symlinks the other way round. Don't symlink the polls to somewhere else but symlink the cgi and ruby scripts to elsewhere. I did this in the Debian package I created and it works.

Basically, I have the real ruby and cgi files in /usr/share/dudle and permissions are set such that only root can modify files in it. The webserver only has read access. And then in /var/lib/dudle I have symlinks to all the ruby and cgi files living in /usr/share/dudle. The webserver has write access to /var/lib/dudle and can create directories there.

This solves all the things that you mentioned in your initial bug report:

  • apache does not have write access to the code (because the files live in /usr/share/dudle in my case)
  • you can back up /var/lib/dudle without backing up the program code (your backup would just include dead symlinks to the cgi and ruby files)
  • you can put the poll data on external volumes

So maybe this could be documented somewhere but it already works without any modifications to dudle itself.

from dudle.

kellerben avatar kellerben commented on August 15, 2024

do you have a make install target for the setup? I might include that…
(I might as well directly create the symlinks to /usr/share/dudle, i.e. a config param…)

from dudle.

josch avatar josch commented on August 15, 2024

We can continue discussion about the install target in pull request #84

from dudle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.