How to unhide the /Users folder while in Recovery Mode in OSX - macos

I'm trying to access some files in my home directory on my macbook, using the terminal on recovery mode. In a normal boot, I can do:
sudo chflags nohidden /Users
to unhide the Users folder, but this is not working on recovery mode. I've tried this:
diskutil list
but no encrypted and/or offline Volumes appear. Does someone know how can I access my files?

Ok, so I just needed to mount the partition from Disk Utility, using File->Mount with the correct partition selected. After that, I can access my data.

Related

Xcode Server Integration Cache Location, Ram Disk, and _xcsbuildd

I'm working with Xcode Server and continuous integrations. We're experiencing really slow build times.
My first attempt at speed up is using a RAM DISK and storing build files there. We are using mac mini with a SATA drive so I'm attempting to see how much time could be saved by eliminating that drive from part of the build process.
I created a RAM DISK with:
diskutil erasevolume HFS+ 'XcodeData' `hdiutil attach -nomount ram://8388608
I started by trying to set the DerivedData location onto the ram disk, but when running a CI build data isn't stored there.
I found what looks to be the build data for every CI at /Library/Developer/Integrations/Caches.
I tried symlinking ln -s /XcodeData/IntegrationCaches/ /Library/Developer/Integrations/Caches but I get permission errors when running the CI.
I tried chmod 777 /XcodeData/IntegrationCaches/ and I still get permission issues.
I also tried to chown my ramdisk folder to chown _xcsbuildd IntegrationsCaches for ram disk folder.
Haven't had any luck so far.
Has anyone else tried doing something like this?
Like #bolnad mentioned in the comments, it turned out that the RAM DISK by default ignores ownership. You can "Get Info" in the finder for that volume, then uncheck "Ignore Ownership", this will allow you to use chmod and tools to change users where required.

Get actual moint point of network volume in osx cli

In an automated system, i copy files to a mounted network volume with a sh
In basic i do "cp file.pdf /Volumes/NetworkShare/".
This works well until the remote system is down.
So before copying i can do a ping to detect if it's online.
But... when i get online OSX often remounts on a different path "/Volumes/NetworkShare-1/".
The old path "/Volumes/NetworkShare/" stil exists altough it's useless.
So, how can i find the actual mount point of this share in OSX cli?
I found out that diskutil does something like this for local disks, not for network volumes. Is there an equivalent for diskutil for network volumes?
The mount command (just on its own) will list all mounted filesystems. As for why OS X is creating that extra directory, that is pretty odd. Did you manually mount the filesystem, by any chance? If you created the “NetworkShare” directory yourself, OS X’s auto mounter might do what you’re suggesting.

copy OSX file with permissions

I have an OSX FTDIUSBSerialDriver.kext file for an FTDI Chipset Driver where the Info.plist file has been modified for optimum performance.
I would like to supply the modified file to users of our hardware, so that it can be copied to: MacHD/System/Library/Extensions/ and it must have "system" ownership and permissions.
What would be the easiest way to:
Copy the working FTDIUSBSerialDriver.kext file (package) retaining the current ownership and priveleges for distribution ?
Provide the user with "simple" terminal instructions on how to copy and overwrite the file to MacHD/System/Library/Extensions/ with system ownership and permissions ?
Every time I try and test, the permissions and ownership get set to the current user so the driver will not load at startup.
It would be optimal if I could bundle this as a simple installer, so the user could just double click to install.
Thanks
Peter
Edit: Needs to work on 10.6.8 and above. I am aware of a finder option in OS X 10.8 that allows for "duplicate exactly" and "paste exactly", but this is not an option for everyone.
you can use cp -p
-p Cause cp to preserve the following attributes of each source
file in the copy: modification time, access time, file flags, file
mode, user
ID, and group ID, as allowed by permissions. Access Control Lists (ACLs) and Extended Attributes (EAs), including resource
forks, will
also be preserved.
We are using a script to alter the FTDIUSBSerialDriver.kext file: See: https://github.com/arminbw/wiretouch/blob/master/perl/modify-ftdi-driver-settings.pl
However, did you by any chance experience problems after upgrading to 10.10? See: Patched FTDIUSBSerialDriver kext has to be unloaded/reloaded after reboot (OSX 10.10). Any ideas?

What folder on Mac is writeable without admin access but readable by all users?

I'm looking for a place to save my app's license file. I want it in a location that's accessible by all users so if one user on the machine activates the app, the app is also activated for every other user. However, I don't want to require elevation to write to this location.
On Windows, I use C:\Users\Public. Is there an equivalent on OS X?
Thanks!
You can make any directory you own publicly accessible by allowing it with chmod. For instance:
mkdir ~/Public
chmod 755 ~/Public
will create and make world-readable the directory /Users/YourName/Public

How can I move MySQL data directory on Mac OS 10.5? (and related questions)

I've managed to mess up my MySQL database (on Mac OS X 10.5) and need help recovering!
I tried to add an index to a fairly large table (190 million records) and in the course of this, I ran out of disk space. Subsequently realized that the partition with the data directory is too small and so I need to move it.
Initially I thought that I would just copy the data directory to another location, then bung a symlink in place of the original data directory.
BUT it refuses to move!
sudo cp -r /usr/local/mysql/data .
cp: ./data: Permission denied
(I have stopped the mysqld process before attempting this move)
Help!
This isn't a mysql question, but rather an OS question.
I would guess that you either don't have permission to write to the current directory, or there's already a directory there named 'data' that you don't have permission on, etc.
In my experience, MySQL doesn't like running out of disk space at all. Make sure the last records are OK after you bring the engine back up.
Also, don't use the symlink - change the mysql config. In Unix, this would be the 'datadir' setting in /etc/my.cnf.

Resources