Overview
This article describes a known issue resulting in an Uncaught exception error that prevents you from opening the Code42 agent. This error appears when the Code42 agent log directory has limited permissions.
To correct this problem, follow the steps below.
Cause
When permissions on the Code42 agent log directory are changed by the end user or third-party software, it can result in the Code42 agent being unable to write to the log files in that directory. When the Code42 agent runs a check on startup to verify that it can perform all its required tasks, it encounters the problem with being unable to write to the logs. The Code42 agent then shows the Uncaught exception error that prevents the Code42 agent from starting.
Diagnose
Verify the problem by viewing the permissions on the Code42 agent log directory.
Windows
- In Windows Explorer, navigate to the parent directory of the Code42 agent log directory:
- If the Code42 agent is installed for everyone: C:\ProgramData\CrashPlan\
- If the Code42 agent is installed per-user: C:\Users\<username>\AppData\<Local|Roaming>\CrashPlan\
- Right-click the log folder and select Properties.
- If an error dialog displays the message You don't currently have permission to access this folder, follow the recommend solution for Windows below.
Mac
- Go to Applications > Utilities.
- Open Terminal.app.
- Enter this command:
cd ~/Library/Logs/CrashPlan
Terminal attempts to open the Code42 agent's log directory.
For example:
prompt$ cd ~/Library/Logs/CrashPlan
-bash: cd: ~/Library/Logs/CrashPlan: Permission denied
- If Terminal reports
Permission denied
, follow the recommended solution for Mac below.
Linux
- Open Terminal.
- Enter this command:
ls -la ~|grep .code42
Terminal accesses the ~/.code42 directory and lists the permissions assigned to it along with other directory details. The line returned by Terminal is similar to the following: drwxr-xr-x 3 <owner> <group> 4096 Jan 6 21.48 .code42
For example:
prompt$ ls -la ~|grep .code42
total 1
drwxr-xr-x 3 root root 4096 Jan 6 21:48 .code42
- If Terminal reports root as the <owner> of the ~/.code42 directory, follow the recommended solution for Linux below.
Contact Technical Support Engineers
If permissions for the log directory appear normal,
contact our Technical Support Engineers for help with fixing the problem of not being able to open the Code42 agent.
Recommended solution
On Windows and Mac, resolve the issue by changing permissions for the Code42 agent logs directory. On Linux, resolve the issue by deleting the Code42 agent logs directory. The Code42 agent recreates it with the appropriate permissions the next time you launch the app as a user.
Windows
- Log in to Windows as a user with administrative access rights.
- In Windows Explorer, navigate to the parent directory of the Code42 agent log directory:
- If the Code42 agent is installed for everyone: C:\ProgramData\CrashPlan\
- If the Code42 agent is installed per-user: C:\Users\<username>\AppData\<Local|Roaming>\CrashPlan\
- Right-click the CrashPlan folder and choose Properties.
- Click the Security tab. (Make sure this shows that the logged-in user has permission to access this folder.)
- Click Advanced.
- Click Change permissions.
- Select Replace all child object permission entries with inheritable permission entries from this object.
- Click Apply.
A warning dialog appears: This will replace explicitly defined permissions on all descendants of this object with inheritable permissions from Code42. Do you wish to continue?
- Click Yes, followed by OK.
- Open the Code42 agent.
Mac
- From the Finder, open Applications > Utilities > Terminal.
- Enter this command:
sudo chown -R $(logname) ~/Library/Logs/CrashPlan
- Press Return.
- Enter your password when prompted.
The password doesn't appear as you enter it.
- Verify that you have changed the directory's permissions by entering this command:
cd ~/Library/Logs/CrashPlan
- Press Return.
Terminal opens the Code42 agent's log directory.
- Enter this command:
pwd
- Press Return.
Terminal confirms that the ~/Library/Logs/CrashPlan directory is open.
Here's what the series of commands and replies look like all together:
prompt$ cd ~/Library/Logs/CrashPlan
-bash: cd: ~/Library/Logs/CrashPlan: Permission denied
prompt$ sudo chown -R $(logname) ~/Library/Logs/CrashPlan
Password: ***
prompt$ cd ~/Library/Logs/CrashPlan
prompt$ pwd
~/Library/Logs/CrashPlan
- Open the Code42 agent.
Linux
- Delete the ~/.code42 directory.
For example, delete the directory using the rmdir command. You must delete the directory contents before you can delete the directory.
- The next time you launch the Code42 agent, launch it as a user.
For increased security, Code42 recommends that you launch and run the app as a user, instead of as root. When you launch the app as a user, Code42 recreates the ~/.code42 directory with the appropriate permissions.
In rare instances, an issue with the ui.log file can cause an uncaught exception error. To resolve the issue,
stop the Code42 service, delete the
ui.log file (from the UI log file locations listed in the
File and folder hierarchy article), and restart the Code42 service. After the service starts, a fresh
ui.log file is created.