Code Monkey home page Code Monkey logo

Comments (4)

orgrim avatar orgrim commented on May 30, 2024

Hello,

Indeed, permissions are not explicitly set on backups, so one can end up with backup directories that are partly readable.

I guess the simplest way to deal with it is to make backup directories only accessible by the user who created them. This would be nice for security and would avoid spending time trying to put correct permissions everywhere.

What do you think?

from pitrery.

LaetitiaAvrot avatar LaetitiaAvrot commented on May 30, 2024

Well, you're absolutely right. Permissions on folders should be set so that no one except the backup creator can see them.

I don't see this recommendation in the prerequisites. Maybe you should add them.

But what I see in code seems not satisfying (to me and I might be wrong)

if [ "$out_rc" != 0 ]; then
	        echo "!!! This backup may be imcomplete or corrupted !!!"
fi

There is nothing to test permission. Whatever the error is, the message is the same and states there is corruption or incomplete backup.

from pitrery.

orgrim avatar orgrim commented on May 30, 2024

Commit 3888a9a restrict the permissions with a chmod 700 at backup time and a check of the permissions in list.

orgrim@serfouette:r10 $ sudo -u postgres pitrery -c r10 list
List of backups on localhost
ERROR: acces denied to /home/pgsql/pitrery/r10/2017.10.18_22.05.57
ERROR: acces denied to /home/pgsql/pitrery/r10/2018.01.08_14.32.23

Regards

from pitrery.

LaetitiaAvrot avatar LaetitiaAvrot commented on May 30, 2024

Perfect

from pitrery.

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.