Privilege mess

this days i moved some files and folders from my older account i used previously and now i get wrong privileges. Double owner, double groups or there like.
Some jpg’s show no preview and refuse to open, or adding files to some folders needs authentication

Before i tried to use the Migration Assistant, but that damn app hanged up on “less than a minute” for several hours. So i was forced to drag-drop manually my work from the old account to the new one. Obviously now i’ve lots of errors.

I search for solution because Disk Utility isnt able to repair that mess, tried several times. Disk Utility repairs Apple directories and files naturally. Fsck does the same as Disk Utility, even operating on my HD from another external HD.

For now i wrote a simple script:

display dialog "Choose a CHMOD MODE" & return & return & "Restore default privileges" with icon 1 buttons {"=rw,+X", "644", "Cancel"} default button 1
set the_b to the button returned of the result
if the_b is "Cancel" then
	set sh_1 to "chmod " & the_b & " "
	tell application "Finder"
		set f to selection
		set dd to 0
		repeat with a in f
			set a to a as text
			do shell script sh_1 & "'" & POSIX path of a & "'"
		end repeat
	end tell
end if

it works, but im unable to get rid of double owners with different privileges and double groups or similar with different privileges.

hI Joy

not an apple script solution but I gave up with trying to script privileges and opted to use this wee app,


chmod can change only the read/write/execute flags.
To change owner and group you need chown

Thank you very much.i used this app already. However, im not able to delete double owners with different privileges, doing it manually via info panel is a hell.

thanks, does chmod remove double owners with different privileges and there like?


If I were you, I’d use TimeMachine to just remove the moved files, with double owner ship, the run disk util, to see to that everything is in order, and then restore back the files you moved to the original place they were located, and then use the wee app, if it works for you.

I’d also contact the creators of the havoc making script/app you used, telling them about the consequences of using it.

cant to it. The files i moved were from a previous account, therefore the mess. I had to create a new account, because the old one gave me kernel panics every day. Tried to import my work from the old account into the new one, but as already written in post 1, Apples Migration Assistant worked either. So i had to force drag drop my files from my old account into my new account. I had to paste applescript-apps code into fresh code to restore them. Afterwards, i used Batchmod and my own Script to restore privileges, but that helped only in part.

no, but chown does.
The standard owner/group pair of a file in the home folder is :staff, for example if the short user name is joy the syntax is

do shell script "/usr/sbin/chown joy:staff /path/to/file.ext with administrator privileges 

it’s recommended to use chown with administrator privileges

I tried chown with/without admin privileges and -paradoxical- nothing changes.
chmod adds more privilege holders/persons instead to clean up the existing ones, instead to reset the given ones to their right, default values.

Isnt possible to delete privileges in a first step, followed by chown to add the default privileged persons in a second step ?

thanks for any help!