A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/orgrim/pg_back/commit/c4c53ac9173190675eb2008e879006feba6857d1 below:

Fix mode of the directory when the format is dir · orgrim/pg_back@c4c53ac · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+8

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+8

-1

lines changed Original file line number Diff line number Diff line change

@@ -704,7 +704,14 @@ func (d *dump) dump(fc chan<- sumFileJob) error {

704 704

d.Path = file

705 705

d.ExitCode = 0

706 706 707 -

if err := os.Chmod(file, 0600); err != nil {

707 +

var mode os.FileMode = 0600

708 +

if d.Options.Format == 'd' {

709 +

// The hardening of permissions only apply to the top level

710 +

// directory, this won't make the contents executable

711 +

mode = 0700

712 +

}

713 + 714 +

if err := os.Chmod(file, mode); err != nil {

708 715

return fmt.Errorf("could not chmod to more secure permission for %s: %s", dbname, err)

709 716

}

710 717

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4