dscl

Proper group/permissions using MAMP site

I'm building a website using MAMP on OS10 Leopard. I'd like to be able to set an publicly accessible upload directory to 0775 and not 0777. I've tried a bunch of combinations in the "Permissions" panel in MAMP. I can get the site running under "www" group and 0775 works great for uploading, but then I cannot edit or delete the uploaded f...

Running script with admin permissions on OS X

Hi all, I've tried my best to find out a solution with the many script questions on Stack Overflow and the internet, but I can't seem to find the solution I need. What I want to do is create a more automated and less clicking solution to remove all the Mobile cached user accounts on a system. I've been logging in and manually going to ...

list of uids / names of System Preferences > Accounts

How can I obtain an array with uid and names? I could iterate from 0 to 99999 and do a getpwnam(). However most machines have less than 5 accounts, so it's not optimal. I don't know what framework is responsible for this and thus I have no clue what to search for. Is there a more optimal solution that can traverse the accounts? Edit:...

dscl doesn't work from inside re-attached screen

I am on Mac OS X 10.5.8. I am not sure exactly when this started happening, but I find that when I re-attach to a screen session that was started from an ssh session, anything relying on dscl (directory services), or the underlying getent stuff, fails. If I start the session on that machine in Terminal, everything works. Only remotely s...