Lock folders on mac mountain lion

The uchg flag can only be set or unset by the file's owner or by an admin user using sudo. The schg flag can also be used to lock a file or folder. However, this flag can only be set by the root user or an admin user using sudo. And once set, it is much harder to unset it, so it is more permanent.

The schg flag can only be unset in single-user mode restart your Mac and hold down Command-S after the chime. You can see the state of these extra flags with the ls command in Terminal if you use the -lo option; i. I don't know anything more about the arch flag. The opaque flags is only relevant if you use the "union" option when mounting a filesystem and I don't know if OS X currently supports that option. The nodump flag is only relevant when using the dump command. But the uappnd and sappnd flags are potentially quite useful. If the uappnd flag is set on a file, the file cannot be changed except by appending data to the end of the file e.

If the uappnd flag is set on a folder, new files may be added to that folder, but the files in that folder cannot be renamed and no files may be removed from the folder. The uappnd flag can only be set or unset by the file's owner or by an admin user using sudo. The sappnd flag gives the same effects but like schg is more permanent, being only unsettable in single-user mode.

There is no indication of the state of these "append" flags in Finder's Get Info window. Especially since the state of most of these flags is not visible in Finder, it would be a good idea to keep a separate document recording which files or folders you changed the flags on. That way you have something to remind you what you changed if troubles occur sometime later. Note also that Apple does not document the behaviour of most of these flags, so you would be well advised to do thorough tests before relying on them in a production environment. Note also that there are several 3rd-party utilities that provide GUIs for setting some of these flags.

I haven't tried these utilities myself, so I won't mention them here. Locking files and folders to prevent changes 8 comments Create New Account. The following comments are owned by whoever posted them. This site is not responsible for what they say. Correction Authored by: vladimus on Oct 17, '03 PM. Oops Authored by: hayne on Oct 17, '03 PM.

Locking files and folders to prevent changes Authored by: mattcrane on Aug 15, '04 AM. Read-only file system in single-user mode Authored by: hayne on Aug 19, '04 AM. Locking files and folders to prevent changes Authored by: macmedix on Jan 30, '06 PM.

How to Change File Permission From Read-Only to Read-Write on a Mac

Great Hint! Even the mighty Root can't change files after this command has been applied, and that goes for admins doing sudo as well. Nicely protected. Use ls -lo to see the flags. Problem: this seems to work differently on a network volume, even if I ssh into that server. When on a network volume in this case OSX non-server That's sort of disappointing, as I expected it would work the same on the servers as it does on my Mac. I want the files to not only be protected, but also easily opened in place. How could this be improved to work better? Dave N [ Reply to This ].

Hint Options

Locking files and folders to prevent changes Authored by: pendraggon87 on Dec 01, '07 PM. Search Advanced. From our Sponsor From the "System Preferences" window, select the "Security and Privacy" icon in the first row. You'll then see a new window asking you to choose which user accounts on the computer will be able to access the encrypted volume you're about to create.

If that button is grayed out, it means FileVault is turned off in your system settings. To turn it on, follow these steps:.

Related articles:

Click on the gold-colored padlock icon in the lower left corner of the "Security and Privacy" window. You'll be asked to enter the username and password for the administrator account on the computer. Once you do so the gold padlock will switch to look unlocked instead of locked. Choose which user accounts can access the encrypted volume you're about to make. The account from which you're making the volume will be checked by default. If you want any other accounts to have access, manually select them. Make sure these accounts have passwords set before you choose them.

When you're done, click "Continue. Write down your recovery key.

Password Protect Folders & Files in Mac OS X with Encrypted Disk Images

You should now see a window displaying a "recovery key" which acts as a backup password for your encrypted volume if you ever forget your account password. The key should be twenty-four characters long.

Locking Files In Mac OS X Lion

The only way to change it is to re-encrypt the FileVault volume. Write this key down somewhere and secure it in a safe place. Press "Continue" once you've secured your recovery key. Choose whether you want Apple to store your recovery key or not. You should now have the option to let Apple store your recovery key for you. First, make sure you have an Internet connection, then check the box next to either "Store the recovery key with Apple" or "Do not store the recovery key with Apple. Restart the Mac. You'll be prompted to do so by a new window.