Change octal permissions on newly created backup directories to something other than 0777
Bug #815966 reported by
P
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Back In Time |
New
|
Undecided
|
Unassigned |
Bug Description
New directories on my backup disk are being created with 0777 permissions. A little digging revealed that this is because the call to os.makedirs[0] in common/tools.py on line 108 has octal permissions of 0777 unless otherwise specified. It seems imprudent to have the backup directories be world-writable since then anyone can delete those files.
Can I suggest perhaps adding alternative permissions to the os.makedirs call? Something like 0750 would seem sensible to me: owner has full permissions, group members can see the contents and everyone else is excluded.
To post a comment you must log in.
I've since realised that os.makedirs also uses the system umask value when no particular value is given, as such I'm not sure where the problem lies now. The temporary directory new_snapshot has the correct permissions on it. I think one of the chmod commands somewhere in snapshots.py is leaving the newly renamed snapshot directory with full 0777 permissions on it.