Read-only file system" with SIP disabled in macOS Catalina - macos

I am trying to copy some files from a path to my libs path (/usr/lib), I am trying with sudo cp {my file}/usr/lib/
bit I got this error.
/usr/lib/{my_file} Read-only file system
I have validated and indeed System Integrity Protection is disabled (SIP) I am using macOs Catalina 10.15.4
I Hope you can help me thanks.

You just should try with
sudo mount -uw /
it should work

I just recently joined stack overflow so I am not able to up-vote the above answer. Using sudo mount -uw / definitely works. In my case I needed to add a small script to /sbin to overcome an issue with VMware Tools. Starting with macOS Catalina, disabling SIP and then executing this command as root was the answer.

I'm also new to stack exchange, but want to add that
"sudo mount -uw /" worked. Thank you #Juanse
In my case, was suffering from the problem of Kernel_Task using more than 500% of CPU on my Mid-2012 15 MacBookPro aka (MacBookPro9,1 ) with quad-code Intel Core i7.
After multiple solutions did not work, I went on to try a solution posted at: https://discussions.apple.com/thread/8461404?answerId=33657338022#33657338022
Which instructed me to:
Reboot into recovery mode.
Select Utilities/Terminal, csrutil disable , reboot.
cd:
/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources
move or delete a file based on my version of Mac as listed in the thread. For my MacBookPro9,1 the file 4B7AC7E43945597E.plist
Reboot into recovery mode
Select Utilities/Terminal, csrutil enable , reboot.
The problem with the solution, is that when I tried to "mv 4B7AC7E43945597E.plist ~", or even "sudo mv 4B7AC7E43945597E.plist ~", I got a read-only file system message. Running "sudo mount -uw /" made the file system writeable. Note that the steps of booting into recovery mode and disabling / enabling csrutil turned off, and then back on the apple System Integrity Protection (SIP), which is necessary if you wish to change certain key system or configuration files.

Related

cannot mount usb partition - unknown file system exfat

I have a USB stick with important info that would not show up in Windows. I tried the Disk Management Utility, and the partition with the data shows up as "healthy", but no drive letter, and right-click menu options all grayed out (except 'delete'). I used another laptop, I used a Macbook, all to no avail.
On Ubuntu, it also would not show up. I tried manual mounting, which did not work, and on parted it the "File system" column is empty.
Using fdisk -l it shows as HPFS/NTFS/exFAT.
???
I thought to remove my question, but since it took me a while to find the answer, others may benefit:
sudo apt install exfat-fuse exfat-utils
Now I could mount it with exfat specified as file system (and anyway now Ubuntu also automatically mounted it).
uanble to mount exfat file system then needs to follow below steps
Open a terminal (Ctrl+Alt+T shortcut in Ubuntu).
sudo add-apt-repository universe
sudo apt update
sudo apt install exfat-fuse exfat-utils

Reset custom macOS icon in rEFInd

I installed rEFInd the other day to test out some Linux distros.
But what really bugs me is that I have set an icon for my hard drive which is used by rEFInd.
What I tried to reset it:
Removing the icon from the hard drive
Adding another icon to / and named it .VolumeIcon.png
Reinstalling rEFInd
Added another os icons named boot.png and loader.png to EFI/refind/icons on the EFI volume
The only thing that did work was to set another hard drive icon. But I don't want to have an icon at all.
Does anyone know how I could reset rEFInd's cache?
Okay, it seems to be a caching bug. I finally found a workaround.
To fix it I created an invalid .VolumeIcon.icns on my hard drive, rebooted and removed the icon. Now it works like a charm.
Here are the steps and terminal commands:
Become Root with sudo su
sudo su
Create invalid .VolumeIcon.icns in root directory of internal hard drive
echo "" > .VolumeIcon.icns
Exit from root user
exit
Reboot your system
Remove /.VolumeIcon.icns from root directory of internal hard drive
sudo rm /.VolumeIcon.icns

MAC: Root User Not Getting Edit Permissions

I have authenticated root user as per this tutorial https://support.apple.com/en-us/HT204012
and edit menu shows Disable Root User option confirming it is enabled.
I am still getting EACCES errors and have to use sudo. Additionally, even with sudo, I am getting an EACCES error about mkdir in an npm package from a terminal script even though I have universal read and write permissions for the whole folder.
Does anybody know what's going on or how I can give myself universal use of the terminal without sudo?
To block malware, resent releases of macOS include System Integrity Protection, which makes the following directories unwritable except as part of an OS upgrade:
/System
/bin
/sbin
/usr (except /usr/local, that's writable)
"many" applications in /Applications
This feature can't be disabled while the system is booted up – it can only be disabled by rebooting off the "recovery" partition using the csrutil command:
Boot your mac holding Command + R before the Apple logo appears
Launch Terminal from the Utilities menu
Run csrutil status to check the status, and csrutil disable or csrutil enable to change it.
Reboot to exit the recovery partition
For more details:
https://developer.apple.com/library/mac/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html

dscl create user doesn't work on el capitan

I am trying to create user on OS X El Capitan with admin priviliges from super-user mode.
After running /sbin/fsck -fy and /sbin/mount -uw / and launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist everything works. But after dscl . -create/Users/USERNAME i got error no such file or directory. I tried it even with SIP disabled but it doesn't work too. Thanks for the help.
In El Capitan, the mounts have been changed so that
not even root can edit files in some mounts...ACL changes.
The feature is called SIP and is explained in other
stack exchange posts:
https://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-os-x-10-11
essentially, can boot into recovery mode, type csrutil disable,
boot back into default user mode, make changes,
then presumably, you might want to re-enable csrutil similarly.
Thanks for the reply, but SIP had no effect.
I finally solved it. The problem was /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist that was used in 10.6 and earlier, I was using /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
The dscl commands were executed despite the error with plist and user got created.

How do I force-delete a file on my computer?

I am using Mac OS X El Capitan Public Beta 2.
There is somehow a permission problem with my Desktop (and only this directory) because I can not delete any file.
The classic delete to bin does not work, even though I am prompted a window asking for my password and permission. (I am the administrator).
I also tried a few command lines like sudo rm - R *file* and it tells me that the operation is not permitted even after I enter my password.
Going without the rootless feature of El Capitan did not help either :
sudo nvram boot-args="rootless=0"
sudo reboot
Should I change the permissions of the Desktop directory? If so what are the original ones?
Thank you!
This could be caused by the "rootless" feature introduced in El Capitan... You can find more information about it here .
To disable "rootless", type this in the terminal (you'll have to reboot for the change to apply):
sudo nvram boot-args="rootless=0"
sudo reboot
After numerous try the answer was dead-easy : there is a "lock" option on files and directories in OS X and it was active for my desktop (right click -> information). Interesting is the fact that no command line could break it.

Resources