File tree 3 files changed +10
-7
lines changed
3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 2
2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
<plist version =" 1.0" >
4
4
<dict >
5
- <key >GlobalQuota</key >
5
+ <key >GlobalQuota</key >
6
6
<integer >REPLACE_TM_SIZE</integer >
7
- </dict >
7
+ </dict >
8
8
</plist >
Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ configureQuota()
41
41
echo " Setting quote to ${QUOTA} MB"
42
42
QUOTA=$(( QUOTA * 1048576 ))
43
43
sed " s%REPLACE_TM_SIZE%${QUOTA} %" /etc/TimeMachine.quota.tmpl > " ${BACKUPDIR} " /.com.apple.TimeMachine.quota.plist
44
+ chown root:root " ${BACKUPDIR} " /.com.apple.TimeMachine.quota.plist
45
+ chmod 444 " ${BACKUPDIR} " /.com.apple.TimeMachine.quota.plist
44
46
}
47
+
45
48
backupConfig ()
46
49
{
47
50
echo " Marking ${BACKUPDIR} as supported by timemmachine"
@@ -50,7 +53,7 @@ backupConfig()
50
53
echo " Changing ownership of ${BACKUPDIR} to ${PUID} :${PGID} , this may take a few minutes"
51
54
chown -R " ${PUID} " :" ${PGID} " " ${BACKUPDIR} "
52
55
53
- echo " Restricting permssions on ${BACKUPDIR} , this may take a few minutes"
56
+ echo " Restricting permissions on ${BACKUPDIR} , this may take a few minutes"
54
57
chmod -R u+rwX,g=,o= " ${BACKUPDIR} "
55
58
}
56
59
@@ -67,8 +70,8 @@ if [[ -z ${1} ]] || [[ ${1:0:1} == '-' ]] ; then
67
70
checkBackupDir
68
71
setPassword
69
72
createUser
70
- configureQuota
71
73
backupConfig
74
+ configureQuota
72
75
startSMB " $@ "
73
76
else
74
77
exec " $@ "
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ def compose
53
53
describe file ( '/backups/.com.apple.TimeMachine.quota.plist' ) do
54
54
it { should exist }
55
55
it { should be_file }
56
- it { should be_mode 600 }
57
- it { should be_owned_by 'timemachine ' }
58
- it { should be_grouped_into 'timemachine ' }
56
+ it { should be_mode 444 }
57
+ it { should be_owned_by 'root ' }
58
+ it { should be_grouped_into 'root ' }
59
59
its ( :content ) { is_expected . to match ( '524288000000' ) }
60
60
end
61
61
You can’t perform that action at this time.
0 commit comments