Bug #5613
closedReset to Factory Defaults PHP warnings
100%
Description
From the webGUI I did Reset to Factory Defaults. It seems to try to deleted various folders in /conf (among other things) but does not have success at that. The system does shutdown and reboot back to Factory Defaults OK. I guess it just does not quite clean up everything that it wanted to.
Running on APU nanoBSD.
Output is:
Warning: unlink(/conf/sshd): Operation not permitted in /etc/inc/util.inc on line 1503
Call Stack:
0.0002 232232 1. {main}() /usr/local/www/diag_defaults.php:0
0.1311 1470856 2. reset_factory_defaults() /usr/local/www/diag_defaults.php:85
0.1587 1472408 3. unlink_if_exists() /etc/inc/config.lib.inc:620
0.1589 1472888 4. array_map() /etc/inc/util.inc:1503
0.1589 1473504 5. unlink() /etc/inc/util.inc:1503
Warning: unlink(/conf/backup): Operation not permitted in /etc/inc/util.inc on line 1503
Call Stack:
0.0002 232232 1. {main}() /usr/local/www/diag_defaults.php:0
0.1311 1470856 2. reset_factory_defaults() /usr/local/www/diag_defaults.php:85
0.1604 1472408 3. unlink_if_exists() /etc/inc/config.lib.inc:620
0.1605 1472888 4. array_map() /etc/inc/util.inc:1503
0.1605 1473504 5. unlink() /etc/inc/util.inc:1503
Stopping package arping...done.
Stopping package System Patches...done.
Stopping package Service Watchdog...done.
Stopping package Cron...done.
Updated by Phillip Davis about 9 years ago
PR https://github.com/pfsense/pfsense/pull/2303 fixes the specific calling of unlink_if_exists() from the Reset to Factory Defaults code.
PR https://github.com/pfsense/pfsense/pull/2307 fixes unlink_if_exists() for the general case so that directories really are silently not unlinked.
Either or both PRs fix this issue.
Updated by Renato Botelho about 9 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
2303 is now merged what is enough to fix this specific issue. Still discussing 2307. Thanks!