"chown" not working on latest macOS

Hi

“chown” not working on latest macOS

% id john
uid=501(john) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),702(com.apple.sharepoint.group.2),701(com.apple.sharepoint.group.1),100(_lpoperator)

% su - john2

% sudo chown -R john:staff own_site/Linux*Photo*Dump/

% id
uid=502(john2) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),702(com.apple.sharepoint.group.2),701(com.apple.sharepoint.group.1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)

% csrutil status
System Integrity Protection status: enabled.

% ls -al own_site/Linux*Photo*Dump/ics_72074527_020*
-rwxr-xr-x@ 1 john2  staff  249884 May  3  2023 own_site/Linux Photo Dump/ics_72074527_020.jpg

I do something wrong?
Files on external disk (USB attached)

Add -v to the chown command and it will say why it didn’t work. Might be that john2 isn’t an Administrator account so can’t do a sudo.

It was solved by. KI helped me.

sudo diskutil enableOwnership /Volumes/externalSSD

1 Like