Skip to content

Commit 54bad26

Browse files
author
Qingping Hou
committed
change default file mode to 0664 to be more sensible
1 parent f02382c commit 54bad26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
FlagStatusAddr = ":8087"
2626
FlagExclude []string
2727
FlagScratch bool
28-
FlagDefaultFileMode = "0666"
28+
FlagDefaultFileMode = "0664"
2929

3030
metricsSyncTime = prometheus.NewGauge(prometheus.GaugeOpts{
3131
Namespace: "objinsync",
@@ -168,7 +168,7 @@ func main() {
168168
"skip checksums calculation and override all files during the initial sync",
169169
)
170170
pullCmd.PersistentFlags().StringVarP(
171-
&FlagDefaultFileMode, "default-file-mode", "m", "0666", "default mode to use for creating local file")
171+
&FlagDefaultFileMode, "default-file-mode", "m", "0664", "default mode to use for creating local file")
172172

173173
rootCmd.AddCommand(pullCmd)
174174
rootCmd.Execute()

pkg/sync/pull.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ func NewPuller(remoteUri string, localDir string) (*Puller, error) {
461461
RemoteUri: remoteUri,
462462
LocalDir: localDir,
463463
workingDir: filepath.Join(localDir, ".objinsync"),
464-
defaultMode: 0666,
464+
defaultMode: 0664,
465465
workerCnt: 5,
466466
uidCache: map[string]string{},
467467
uidLock: &sync.Mutex{},

0 commit comments

Comments
 (0)