You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Help needed to remove “sticky bit” file system lock from a shared folder.

Hi

My wife and I share a Mac, (Ventura 13.6.9) each with our own log in, and we both use a "shared folder" for common files.

After a lot of frustration about file permissions on these shared files, and much searching, I have discovered, that Apple puts a "lock" on shared folders. I quote from the book : Apple Training Series: Mac OS X Support Essentials v10.6: A Guide to Supporting and Troubleshooting Mac OS X v10.6 Snow Leopard :

"The /Users/Shared folder has a unique permission setting that allows all local users to read and write items into the folder yet prevents other users from being able to delete files that they didn’t originally put in this folder. This special permissions configuration is brought to you courtesy of the “sticky bit”. Essentially, enabling the sticky bit on a folder defines it as an append-only destination, or, more accurately, a folder in which only the owner of the item can delete the item.

And the problem with the “sticky bit” file system lock is that the Finder prevents even other administrative users from making changes or even unlocking items they don’t own. In fact, this file system lock extends to the command line as well. Even with sudo access, an administrator is not allowed to change a locked item—with one important exception, the chflags command, which allows an administrator to change file system flags, and among other things allows them to lock or unlock any file or folder on the system."


I would very much like to remove this lock so wife and I both have full read, write, overwrite, save, delete etc access to the shared folder, and never get blocked again by this permission.

The problem is I have zero understanding of how to use the Command Line or Terminal in order to modify it.


I would be very grateful if someone could be kind enough to give me the instructions on how to do this, assuming I am user 'Him' with admin rights and and she is user 'Her'. (I also have 'admin', 'system', 'wheel' and 'everyone' as users, but don't know who they are, except obviously 'everyone'.)


Thanks in advance and Merry Christmas and season's greetings to all.

Guern

iMac 27″ 5K

Posted on Dec 21, 2024 3:54 AM

Reply
4 replies

Dec 21, 2024 6:45 AM in response to Guern2020

It's likely easier to just create a new folder in /Users/Shared and give you both access in the Finder's Get Info window; it won't have the sticky bit set.


If you still want to do it through the command line, choose Utilities from the Finder's Go menu, open the Script Editor, and run:


do shell script "chmod 0777 /Users/Shared" with administrator privileges


(257421)

Dec 21, 2024 7:21 AM in response to Niel

Thank you very much Niel.

If I create a new folder in /Users/Shared and give us both access, and then move all our existing shared files to the new folder, they will keep their access settings, won't they?

Therefore I guess its probably better to go the command line route (not that I'm very comfortable doing so!).


On that, I can copy the shell script into Script Editor, but how do I do that with "administrator privileges", please?

Guern

Dec 21, 2024 8:31 AM in response to Guern2020

I was able to remove the sticky bit using sudo chmod (see below):


Before:

/bin/ls -dleO@ /Users/Shared
drwxrwxrwt@ 49 root  wheel  -      1568 Nov  4 17:48 /Users/Shared


Notice the 't' at the end of drwxrwxrwt, that is the sticky bit turned on.


Removing the sticky bit:

sudo chmod 777 /Users/Shared


After:

/bin/ls -dleO@ /Users/Shared
drwxrwxrwx@ 49 root  wheel  -      1568 Nov  4 17:48 /Users/Shared


Notice that the 't' has changed into an 'x' which is typical for a directory that allows anyone to search it.


FYI: The 49 is just an indication of the number of files and directories plus . and .. that exist in my /Users/Shared. Your value will be different. The 1568 is the size in bytes of my /Users/Shared

/bin/ls -a /Users/Shared | wc -l


PS. I have given my macOS Terminal "Full Disk Access" via System Settings -> Privacy & Security -> Full Disk Access

Help needed to remove “sticky bit” file system lock from a shared folder.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.