MacOS Catalina更新后Codekit文件权限问题求助
I’ve helped several users troubleshoot this exact issue after upgrading to Catalina, so let’s break down what’s happening and how to fix it quickly:
Why This Happens
macOS Catalina enables System Integrity Protection (SIP) by default, which locks down the root directory (/) as read-only. Codekit’s default setup tries to create a Sass cache folder at /.sass-cache—a location it no longer has write permissions for, hence the Errno::EROFS read-only file system error you’re seeing.
Step-by-Step Solutions
Update Codekit’s Global Cache Path
- Open Codekit and hit
Cmd+,to open Preferences. - Navigate to the Languages tab, then locate the Sass/SCSS section.
- Find the "Cache Location" setting—swap the default root path for a writable user-level directory, like
~/Library/Caches/Codekit/Sass-Cache(this is a standard, safe spot for app caches). - Save changes and restart Codekit to apply the new setting.
- Open Codekit and hit
Set a Project-Specific Cache Path
If you prefer keeping cache files tied to individual projects:- Select your project in Codekit’s sidebar.
- Click the gear icon to open project-specific settings.
- Go to the Sass/SCSS section.
- Override the cache location to a folder inside your project (e.g.,
./.sass-cache). This keeps cache files localized and avoids system-wide permission issues entirely.
Check for Global Sass Configuration
If you have a.sassrcfile in your home directory (~/.sassrc), open it and make sure there’s no line forcing the cache to the root. If you see something like--cache-location /.sass-cache, replace it with a writable path such as--cache-location ~/.sass-cache.
Verify the Fix
After adjusting the cache path, recompile your project in Codekit. The error should vanish immediately, as the app will now write cache files to a directory you have full access to.
内容的提问来源于stack exchange,提问作者Asaad Mahmood

