SIP is disabled, but /usr/bin is write protected anyway (macOS Catalina beta 10.5) - macos-catalina

I disabled SIP, but directory /usr/bin is write protected anyway. How to get write access for /usr/bin? Please don't suggest to switch to /usr/local/bin.

I assume this answer might be relatively off-topic, as I'm not running the beta version of Catalina, but the official one.
In order to perform changes to /usr/bin, you'll have to perform the following steps.
Disable System Integrity Protection (SIP).
Mount / as writeable.
Disable SIP
Reboot your system into recovery mode (reboot and hold cmd + R while booting)
Use the appropriate credentials when prompted.
Navigate to Utilities -> Terminal in the top bar.
In the terminal session, execute # csrutil disable.
Reboot into normal boot mode (# reboot).
Mount / as writeable
With the OS in normal mode, start a new terminal session and execute the following:
$ sudo mount -uw /
Please note that / will be mounted as read-only on the next system boot.
In order to enable SIP, the process is exactly the same as disabling it, except for the fact that you would have to run # csrutil enable.

Catalina has a new file system arrangement where most of the system files are write-protected. Apple uses two partitions, a read-only one for the main system files and a writeable one for other files, and melds them together and presents them as one to the user.
For details see the WWDC video What's New in Apple Filesystems

Related

Is there any way to use runasoriginaluser in uninstallrun in inno setup?

I have written an application using docker-toolbox and inno setup script for the application installation in windows 10.
And I want to remove the docker-toolbox VM, while I uninstall my program. However, the VM cannot remove completely by following inno setup script.
[Setup]
PrivilegesRequired=none
[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""docker-machine rm -y myDocker"""
The command "docker-machine rm -y myDocker" always work whenever runs in my user cmd, but not works in inno setup uninstallrun.
And I checked and found out that docker-toolbox is based on VirtualBox. VirtualBox uses a per-user environment. Becoming root (or any other user) does not give you access or more powers to the original user's VMs. ALWAYS perform VM operations as the user that actually created the VMs. Hence, I have to run a command as a original user in uninstallrun, but I cannot find a way to do so.
Looking forward for a help and support, I have spent lots of times in this problem.
Is there any way to use runasoriginaluser in uninstallrun in inno setup?
You should not modify a specific user profile from an (un)installer that runs with Administrator privileges (installs software for all users).
See Installing application for currently logged in user from Inno Setup installer running as Administrator.
runasoriginaluser flag is not supported in UninstallRun section. Probably because it won't be of any use there anyway. What the flag does in Run section is that it executes program with privileges with which the installer was originally executed. But uninstaller (for installer elevated to Administrator privileges) is executed with Administrator privileges straight away, when executed from Control Panel/Settings app.

ColdFusion 10 Mandatory Update install fails on VM

I need to run the mandatory update for ColdFusion 10 so I can apply the later updates to the server. I downloaded the file and tried the instructions listed here: Mandatory Update Instructions.
I have a singular instance, so this should be fairly straightforward. I download the file, place it in the "hf-updates" folder, and then do java -jar cf10_man_updt.jar and I get the following notice:
Graphical installers are not supported by the VM. The console mode
will be used instead...
The installer proceeds to hang and fails to complete. I then go to option #2: Silent mode. I create my properties file and then do java -jar cf10_mdt_updt.jar -i silent -f install.cfg.txt. I get the following message:
Installer User Interface Mode Not Supported
Unable to load and to prepare the installer in console or silent mode.
This one has the courtesy to actually terminate so I don't have to close the command prompt window to retry, but I'm still nowhere. Any ideas on what I can do?
Alex provided the correct answer. I had been using the JRE in my program files folder (explicitly, actually. There was no javapath to speak of in the environment variables. I shorthanded the command for the sake of brevity). I changed the command to "C:\Coldfusion10\cfusion\jre\bin\java" -jar cf10_mdt_updt.jar and the install ran successfully.

Spring Tool Suite crashes on virtual OS X

I'm trying to get Spring Tool Suite (STS) running on a virtual OS X machine (VMWare 8.0.2) on a iMac host. The virtual OS X machine is the latest OS X: 10.11.2 and is a clean install with just NetBeans 8.1 (with JDK8 Java 1.8). NetBeans works flawlessly.
STS gets the startup splash, it loads the framework and I get to see the interface for approx. 1 second, then I get the "Spring Tool Suite quit unexpectedly"
I've tried STS 3.7.2 and 3.7.1, both have exactly the same problem. I've tried the copy that works native on my host iMac, that too gave the same problem.
Anyone familiar with this problem? Google gives me no results. Would it be impossible to run STS on a Virtual Machine?
I could post the dump from OS X but that would be a lot of text, please let me know if that would be helpful?
Thanks in advance!
STS Dumpfile (Dropbox)
There are at least two ways you could try to work around this problem.
1) run STS with a JDK7 at least once. JavaFx is not supported with JDK7 and STS will automatically fallback on using the old dashboard. This should allow you to launch STS succesfully. You can then change the preference here: "Preferences >> Spring >> Dashboard" to always use the old dashboard. Then go back to running with JDK8 if you wish.
2) Alternatively you can 'hack' the metadata in the workspace to set the preference to use the old dashboard (use this method if the above one seems too onerous, maybe you don't have a old JDK handy)
The metadata file you want to edit is this one (from the root of workspace folder):
.metadata/
.plugins/
org.eclipse.core.runtime/
.settings/
org.springsource.ide.eclipse.dashboard.ui.prefs
If the file doesn't exist, create it and add these two line:
eclipse.preferences.version=1
org.springsource.ide.eclipse.dashboard.uidashboard.use.old=true
If the file exists you only need to add (or change) this line:
org.springsource.ide.eclipse.dashboard.uidashboard.use.old=true
STS was keep crashing on my macos machine so I had to install every time
so I came up with a solution :
cd $HOME
sudo codesign --force --deep --sign - /Applications/SpringToolSuite4.app

Virtualbox shared folder permissions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm using Windows and Virtualbox with RedHat, putting it simple: I've created a shared folder so I can use Eclipse on my Windows OS and do some testing in Linux.
However, I can't access the shared folder with my user, I've logged in with root and used chmod 777 and even moved my user to the folder's group.
Whatever I do the result is the same:
/media/sf_sharedFolder/: Permission denied
What can I do? How can I access the shared folder with my user?
Add yourself to the vboxsf group within the guest VM.
Solution 1
Run sudo adduser $USER vboxsf from terminal.
(On Suse it's sudo usermod --append --groups vboxsf $USER)
To take effect you should log out and then log in, or you may need to reboot.
Solution 2
Edit the file /etc/group (you will need root privileges). Look for the line vboxsf:x:999 and add at the end :yourusername -- use this solution if you don't have sudo.
To take effect you should log out and then log in, or you may need to reboot.
Try this (on the guest machine. i.e. the OS running in the Virtual box):
sudo adduser your-user vboxsf
Now reboot the OS running in the virtual box.
This also works
sudo usermod -aG <group> <user>
Then restart vm
For the truly lazy (no typing, only totally easy copy and paste):
sudo usermod -aG vboxsf $USER
Log out and back in to make the change active.
I know it's a "me too" solution, but I am truly lazy and didn't find any other solution to appeal my innate apathy... :)
For VirtualBox(5.0.24) Host=Mac(El Capitan) and Guest=RHEL(7.2)
Start up your RHEL Guest VM and open up a Terminal. Make sure you have the Developer Tools installed.
sudo yum groupinstall 'Developer Tools'
And the Kernel headers package so that the Guest Additions script can update your kernel.
sudo yum install kernel-devel*
Once you have the prereqs in place its time to install the Guest Additions. With your running VM selected go to the VirtualBox menu and select Devices --> Insert Guest Additions CD image...
Allow a few seconds for the mount to occur and the install script to kick off. Once they have click the "Run" button in the dialog that popped up in your Guest VM.
After the script finishes right click the CD Icon on the Desktop and choose Eject. Then Shutdown the Guest VM.
Create the Shared folder in you Host system using Terminal, I usually put it in my Documents folder, and make sure that your user can access it.
sudo mkdir ~/Documents/RhelShared
sudo chmod 755 <user> ~/Documents/RhelShared
In the Oracle VM Virtual Box Manager select your VM and then click on the "Shared folders" configuration element. In the next dialog click on the Add Folder icon to the right of the Folders List.
Then in the popup window select the Host Folder you just created as the Folder Path and give it a Folder Name that will be used by the Guest VM, also tick the "Auto Mount" check-box.
After rebooting the Guest VM launch a terminal on the Host and check the user that is associated with the running VirtualBox Guest process is either your user, very likely, or in a group with access to the Shared folder.
ps aux | grep VirtualBoxVM
Then as per several of the previous answers in a Terminal on the Guest VM add your user to the vboxsf group.
sudo usermod -a -G vboxsf <user>
Log out and in again to pickup the change.
The shared folder should now be available and accessible as sf_rhelshared assuming you used the same names as I did in the popup window above.
To clarify the last post:
The VBoxManage command is:
VBoxManage setextradata <VM_NAME> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<SHARE_NAME> 1
In my case the following was necessary:
sudo chgrp vboxsf /media/sf_sharedFolder
sudo adduser xxxxxxx vboxsf
where xxxxxx is your user account name. Log out and log back in to Ubuntu.
The issue is that the shared folder's permissions are set to not allow symbolic links by default. You can enable them in a few easy steps.
Shut down the virtual machine.
Note your machine name at Machine > Settings > General > Name
Note your shared folder name at 'Machine > Settings > Shared Folders`
Find your VirtualBox root directory and execute the following command.
VBoxManage setextradata "[vm name]" VBoxInternal2/SharedFoldersEnableSymlinksCreate/[shared folder] 1
Start up the virtual machine and the shared folder will now allow symbolic links.
After adding the user to the vboxsf group, you might need to completely log out of the gnome/xfce/??? session, because someone long ago decided that group affiliation should be cached at first login to the window system.
Or go old school:
% newgrp vboxsf
in any shell you want to use to access the folder. Luckily, newgrp looks up the group list for itself and doesn't used the cached values. You'll still need to log out and back in to access the folder from something other than a shell.
In my personal experience, it's difficult to enable shared folders in VirtualBox but it Is posible. I have a debian Buster guest virtual machine installed in my Windows 10 host.
I don't recognize exactly what did it, but I remember I went to Windows defender, my antivirus to see if they recognize VirtualBox as a program and not as a virus. After that, I press right click on the document file and allowed to share the folder and I gave click to some buttons there and accepted to share with groups and with muy user in Windows 10.
Also, I found a webpage of Windows about something like virtual machines that I don't remember well, but it took me to a panel and I had to change three things double clicking so when I update Windows, it recognizes my virtual machine. Also, in muy debian, in the terminal, using some command lines, muy VirtualBox recognized my user giving permissions, I based on some info in the Ubuntu forums. I put all what I remember.

How to build and install the latest nightly Firefox OS on Alcatel One Touch Fire?

I want to upgrade Firefox OS 1.1 on my Alcatel One Touch Fire to the master branch (the latest revision). After having read the Mozilla Wiki, I cloned the B2G repository, built it for the hamachi target by typing:
./config.sh hamachi && ./build.sh
(There are even prebuilt images)
Now is the hardest part, since Alcatel phones are not rooted and seems to have a locked bootloader.
The docs say that I should flash the device by typing:
./flash.sh
But all I get are these errors:
adbd cannot run as root in production builds
remount failed: Operation not permitted
push: /home/user/B2G/objdir-gecko/dist/b2g/dictionaries/en-US.aff -> /system/b2g/dictionaries/en-US.aff
failed to copy '/home/user/B2G/objdir-gecko/dist/b2g/dictionaries/en-US.aff' to '/system/b2g/dictionaries/en-US.aff': Read-only file system
Could anybody write an simple step-by-step tutorial (easier than this) on how to install the latest Firefox OS to a stock Alcatel One Touch Fire?
I guess first we can check if the phone itself is rooted.
You could try,
$ adb shell
And if shows,
root#android:/ #
Then I think the phone is rooted, and you can flash your phone with ./flash.sh.
If it is not rooted, I think the link you mentioned has provided the steps to create a new boot.img so that you could root the phone.
Here is an excerpt from Mozilla guide on flashing phones related to Hamachi (Alcatel One Touch Fire):
Best build for Hamachi: moz-central Use your LDAP to go here: https://pvtbuilds.mozilla.org/pvt/mozilla.org/b2g_ril/latest-hamachi-mozilla-central/
And then run this script command line: fullflash_gecko_ril_gaia.sh You
may need to preface this with ./ but it should just run upon your
hitting enter. DON'T run ./flash.sh. THIS CAN BRICK YOUR HAMACHI :( -
GB
What is my order of operations from the beginning?
FOR ALL DEVICES... AFTER you have installed ADB, Git, and Xcode, you should:
Connect your device to your machine via USB. You're SURE it's plugged in? OK then...
Get your build with your LDAP credentials (from moz-central): Buri: Need from Naoki Hamachi:
https://pvtbuilds.mozilla.org/pvt/mozilla.org/b2g_ril/latest-hamachi-mozilla-central/
Run this script: fullflash_gecko_ril_gaia.sh
Download gaia from github (it's easier than the command line as you avoid a pull request) at: https://github.com/mozilla-b2g/gaia Along
the right hand side there is an option to "Download ZIP." Unpack that
into a folder, open Terminal and "cd" (ask Stephany or Francis if you
need help with this) into the folder (i.e. wherever you unpacked your
zip file). Run "make reset-gaia".
You should see... a whole bunch of stuff scrolling by on the command line and your device should reboot. If your device does NOT
reboot, try ADB reboot.