How do I lock files (or how do I take ownership to allow locking)?

Joined
Sep 29, 2012
Messages
7
Reaction score
0
Points
1
Total NOOB here (first week on my new computer). I've got files migrated over from my PC that I notice are no longer read-only. When I try to lock them in the "get info" window, the locked check mark disappears after a second and the file is not locked after all. I am the only person who uses this computer and would like to own all files so I can change them at will. How do I fix this? Thanks in advance for any advice.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
You don't want to mess too much with the system-side permissions, or it may have unintended consequences that will render your system unusable.

The files you have that you want to be flagged as read-only can be made that way rather easily. If you right-click on a file and select Get Info, you can see the permissions for the owner, the group, and everyone. Click the lock in the bottom right corner to adjust those if you need to. You can set yourself to "Read only" if you want the file "locked". If you don't want other admin accounts to have access to the file, then remove the "staff" group entirely. And set "everyone" to "No Access".

If you want to do this to a large number of files, the easiest way to do this is make a folder and name it Private (or whatever you find suitable) in your Home folder. Add all your files that need to be Read-only to it. Then Get Info on the Private folder and change the permissions to the same as above. Next, click the gear icon and select Apply to enclosed items.
 
C

chas_m

Guest
If you're the only person that uses the computer, you really don't need to be messing with this AT ALL. There's no reason to lock files that are unlocked and vice-versa.

If other people want to use your computer, give them the built-in Guest Account to use. They cannot access your account in any way, so your stuff is in effect "locked" by virtue of them not being in the same account.

Your account is also not going to be able to be read by people remotely unless you specifically set it up for that purpose. UNIX (the system on which OS X is based) is notoriously secure in this regard, and again designed so that you don't need to mess with/worry about it. See the essay I've linked in my signature.

Should you have a few items of a sensitive nature that you wish to protect further, an encrypted disk image or the method described by lifeisabeach should be more than sufficient.
 
OP
P
Joined
Sep 29, 2012
Messages
7
Reaction score
0
Points
1
RESOLVED! See post #12 below.

The files you have that you want to be flagged as read-only can be made that way rather easily. If you right-click on a file and select Get Info, you can see the permissions for the owner, the group, and everyone. Click the lock in the bottom right corner to adjust those if you need to.
OK. so I've got the get info window up. I see under sharing and permissions that I can read and write, but it doesn't mention anyone else's permissions (owner, group, everyone). And I don't see the lock at the bottom right corner. What next?

chas_m: I am the only one on this computer but need to save some files from myself. As I update a template file, it is extremely easy to delete important things within the file (as I found out the hard way recently). I must make it unchangeable by default to not do this again. None of it is worth encrypting.
 
C

chas_m

Guest
Have you tried clicking the little disclosure triangle next to "sharing and permissions" in the get info window? Are you sure you've scrolled down all the way to the bottom?

Oh wait. Windows switcher. You've set yourself up as a User account haven't you? :)

Go and change your account to an Admin account. Don't worry, it's safe. You're not on Windows anymore.
 
OP
P
Joined
Sep 29, 2012
Messages
7
Reaction score
0
Points
1
Have you tried clicking the little disclosure triangle next to "sharing and permissions" in the get info window? Are you sure you've scrolled down all the way to the bottom?

Oh wait. Windows switcher. You've set yourself up as a User account haven't you? :)

Go and change your account to an Admin account. Don't worry, it's safe. You're not on Windows anymore.
Actually, I took my old computer down to the Apple store and they did a migration. They must have set me up as Admin because I didn't know anything about it one way or the other until you mentioned it. Anyway, I am an admin and there is a guest user account as well (although there will be no guests touching my new computer -- hands off!). What next?
 
C

chas_m

Guest
If you're an admin then you have to be seeing this at the bottom of the get info on any given file or folder:

Permissions.png
 
OP
P
Joined
Sep 29, 2012
Messages
7
Reaction score
0
Points
1
For some reason I suddenly can't open the directory (or is it called folder) with the file whose permissions I've been trying to change. I put a reference to it in the left side of finder window and select it every time, but now selecting it does nothing.

I selected a random file and the permissions were similar to your screenshot:
(tried to copy and paste a screenshot to match your post, to no avail, attached instead).

Now I'm one step back in not being able to see my file to check. What do you suggest to resolve this?
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
I think I've actually attached the screenshot this time.

Bleah... the permissions are messed up. This can be fixed with a Terminal command, but since I'm not comfortable enough in using that, I'm going to suggest a 3rd party utility. BatChmod isn't certified by the developer for 10.8, but reportedly it works. Download that, then point it to the folder in question. Set the owner to you; group to staff. You should set yourself for RWX, and uncheck the options for the other groups if you want that folder secured from all other accounts. Below, go ahead and check Clear ACLs and Clear xattrs. Then check Apply to enclosed, then Apply. This should get the permissions right.

The only other tool I can recommend for this task is TinkerTool System. It's not free but it is cheap, certified for 10.8, and is one of the best apps in this class. I've used it to clear up permissions problems identical to what you are experiencing, so I can go over that if need be.

EDIT: Just to elaborate a little... as I understand it, the problem is that there are two types of permissions: POSIX and ACL. For some reason, they are differing in this case and causing conflicts. It can be fixed as I described (these tools just apply the proper Terminal commands for you), but not via Finder or even the Repair Permissions tool.
 
OP
P
Joined
Sep 29, 2012
Messages
7
Reaction score
0
Points
1
OK I'm back after a long phone call with Applecare, and with a resolution to share if applicable to anyone in the future:

My original question pertained to locking a file, which I thought was the counterpart to Windows's "read-only" setting. I now know that they are different and that locking a file would require a password to open. This is not what I intended; I wanted to set a file so I could open but not change it.

My second, crises-level issue was suddenly not being able to find my files, as mentioned in post 8 above.

I'm running Parallels to access Autodesk Revit (Windows-only program). I've discovered, with Applecare's help, that Parallels creates a virtual partition. If Parallels is not running, the Mac finder cannot see the contents of that partition. I thought I completely lost a directory full of files because I couldn't find them through the finder or in the trash. Once I launched Parallels, I can once again see the "lost" directory in finder. Second issue resolved.

The permissions setting (or what I thought was the counterpart to Windows's "read-only" setting) for these files on the virtual partition is changed on the Windows side in Windows Explorer. After setting it in Windows Explorer, the finder "get info" box permissions setting for the file has changed from "you can read and write" to "you can only read". First issue resolved.

Thank you to everyone who responded.
 
OP
P
Joined
Sep 29, 2012
Messages
7
Reaction score
0
Points
1

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top