equal
deleted
inserted
replaced
162 end |
162 end |
163 end |
163 end |
164 if not switched_user then |
164 if not switched_user then |
165 -- Boo! |
165 -- Boo! |
166 print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err)); |
166 print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err)); |
|
167 else |
|
168 -- Make sure the Prosody user can read the config |
|
169 local conf, err, errno = io.open(ENV_CONFIG); |
|
170 if conf then |
|
171 conf:close(); |
|
172 else |
|
173 print("The config file is not readable by the '"..desired_user.."' user."); |
|
174 print("Prosody will not be able to read it."); |
|
175 print("Error was "..err); |
|
176 os.exit(1); |
|
177 end |
167 end |
178 end |
168 end |
179 end |
169 |
180 |
170 -- Set our umask to protect data files |
181 -- Set our umask to protect data files |
171 pposix.umask(config.get("*", "umask") or "027"); |
182 pposix.umask(config.get("*", "umask") or "027"); |