Link to home
Create AccountLog in
Avatar of Yashy
YashyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Disk from one Mac attached to another Mac. Can't access files on the added disk. How do I change permissions using the terminal to access them?

hi guys,

I have a Mac disk (has Mac Os X Mountain Lion on it) which has issues. So I had to attach it to another work Mac (with  Yosemite installed). However, I'm unable to access any of the files on there due to permission restrictions. I know I can't do anything using the GUI.

So, using the terminal, how can I change the permissions to permit me to access the files? I tried doing sudo chmod 775 /dev/disk1 but it didn't do anything sadly.

Any help would be great.

Thanks
Merry xmas
Yashy
Avatar of arnold
arnold
Flag of United States of America image

You would need to elevate your rights to root. At which point you should be able to.  Issue your Uid is different between the systems.
In future if you "synchronize" uids it should not be an issue.
Avatar of Yashy

ASKER

Hey Arnold,

I'm in as root. Where do I go from there?
As root did the secondary drive auto mount?
 are you able to list the newly mounted partitions?
As root you should not have permission related access issues.

Not clear beyond accessing/transfer file copies what it is you are after.
Avatar of Yashy

ASKER

The drive mounted automatically yes.

But I've taken a snapshot of what I mean. I can't access these folders that have red circles on them. So, I'm trying to change the permission to be able to access these. This drive is from another Mac that has been added to this Mac that I am on.
Mac.jpg
If you're trying to access the files in the Finder GUI, you're never root.  Admin might have sudo privileges, but it's still not the root account.

The simplest way is to run chown.

Assuming your account name is admin, run the following in terminal.app
sudo chown -R admin /Users/Vicky
While chown will fix the access, if you plan on cloning this to a replacement, you will run into issues when you place the clone back in the system it can from.
Once you have root, you can within the terminal copy files from the sevondary attached drives to the destination,........
SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Yashy

ASKER

Thats fantastic! I will try the commands you have me serial:).

Also, you both mention being logged in as root. How would you do that on the GUI?
I suggest you don't enable root for GUI access.  You can seriously mess up your system inadvertently.  I usually only access root via Terminal.app or SSH.  I don't ever set a password for root.

With that said, Apple has instructions on how to enable and disable GUI root access. https://support.apple.com/en-us/HT204012

After you complete your tasks, I suggest you disable your root account afterwards and remove the password.  Macs are actually technically easier to hack than Windows.  Windows has been more secure because of repeated, constant attacks.  A lot of work has been put into making it more difficult to access Windows without user approval.  Generally, it's users that click on viruses and trojans to allow their installations now.  Macs haven't had the benefit of attacks to test security.
Avatar of Yashy

ASKER

Guys, so I have tried all of this. Yet I'm being told that it is a read-only file system. I've gone into the /Users/Vicky folder. And I want to change the ownership of the folder 'Desktop.  I'm in as root right now.

I did sudo chmod -R +r Desktop. Then it returns:

chmod: Desktop: read-only file system.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Yashy

ASKER

AMazing:). Worked:).
You could also remount the disk with hdiutil, but it's probably safer for you to just copy it.