Reply to topic  [ 12 posts ] 
Silly Colleague *rolls eyes* 
Author Message
Official forum cat lady
User avatar

Joined: Fri Apr 24, 2009 8:04 am
Posts: 11039
Location: London
Reply with quote
My silly colleague has managed to lock his desktop on his Macbook. He's running 10.6. I have tried running the following unix command in terminal:

chmod -R 777 [drop folder here]

on his desktop and home folder but it says operation not permitted.

He's got bootcamp installed and Windows 7 so I am blaming that.

Any ideas people? He's new to mac and has already blown this one up once :lol:

I've told him to delete his account and re-create it!

_________________
Still the official cheeky one ;)

jonbwfc wrote:
Caz is correct though


Wed May 18, 2011 9:12 am
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 7:26 pm
Posts: 17040
Reply with quote
oceanicitl wrote:
I've told him to delete his account and re-create it!

Create another account on the mac, give it admin privs, let it take ownership of the relevant directory then give it back to him?

JOn


Wed May 18, 2011 10:14 am
Profile
Doesn't have much of a life
User avatar

Joined: Fri Apr 24, 2009 12:43 pm
Posts: 1798
Location: Manchester
Reply with quote
Can you not select the main Home folder, do a "Get Info" and click the little padlock in the Sharing & Permissions section, entering in the user's admin password. Then, assuming the permissions on the main home folder are correct (i.e. the user is the owner, and all others are set to "Read only"), then go under the little options pop-up menu (the one with the cog wheel icon at the bottom) and select "Apply to enclosing items" - which should filter down the same permissions to all subfolders in that Home folder. The Desktop is just a folder within the main Home folder anyway.

Or try using Disk Utility's "Repair Disk Permissions" option?

_________________
* Steve *

* Witty statement goes here *


Wed May 18, 2011 11:03 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
Reply with quote
Have you tried running chmod with sudo?

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Wed May 18, 2011 11:45 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Tue May 05, 2009 3:29 pm
Posts: 7173
Reply with quote
EddArmitage wrote:
Have you tried running chmod with sudo?

+1

_________________
timark_uk wrote:
That's your problem. You need Linux. That'll fix all your problems.
Mark


Wed May 18, 2011 11:53 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
The home directory should look like this:
Code:
$ ls -l
drwxr-xr-x+ 104 benlavery  staff   3536 18 May 06:50 benlavery


Make sure the owner and group is correct (the "benlavery" is the owner, "staff" if the group).

If any of the above was incorrect, I would do:
Code:
$ sudo chown -R benlavery:staff benlavery
Enter Password:


That sorts out owners. If there is a problem with permissions, it should probably be:
Code:
$ sudo chmod -R 755 benlavery


Check out this too:
Code:
$ id -p
uid   benlavery
groups   staff com.apple.access_ssh _developer _lpoperator _lpadmin _appserveradm admin _appserverusr localaccounts everyone com.apple.access_screensharing com.apple.sharepoint.group.1


His groups should be pretty similar to mine I'd have though. To add a group, I'm pretty sure you can do:
Code:
sudo dseditgroup -o edit -t user -a benlavery groupName


The Mac I am using to test all this is running the latest version of Snow Leopard, I am the first and only user on here (uid 501) and am an admin user. Should be pretty similar to your guy?


Wed May 18, 2011 1:25 pm
Profile WWW
Official forum cat lady
User avatar

Joined: Fri Apr 24, 2009 8:04 am
Posts: 11039
Location: London
Reply with quote
It's OK panic over he'd locked the folder!

And yes I do sudo when I do any commands in Unix - thanks!

_________________
Still the official cheeky one ;)

jonbwfc wrote:
Caz is correct though


Wed May 18, 2011 1:59 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
oceanicitl wrote:
And yes I do sudo when I do any commands in Unix - thanks!


Don't! It's bad practise. Best case is you lock someone out of something and you have to go back in and undo it. Worst case is that you delete/remove/unset something that you can't undo.


Wed May 18, 2011 3:01 pm
Profile WWW
What's a life?
User avatar

Joined: Thu Apr 23, 2009 7:26 pm
Posts: 17040
Reply with quote
<wrinkles brow> Actually, wouldn't a 'repair permissions' from Disk Utility fix this?

Jon


Wed May 18, 2011 3:12 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
jonbwfc wrote:
<wrinkles brow> Actually, wouldn't a 'repair permissions' from Disk Utility fix this?

Jon


Depends if Disk Utility plays with user files or just system files...


Wed May 18, 2011 7:37 pm
Profile WWW
Official forum cat lady
User avatar

Joined: Fri Apr 24, 2009 8:04 am
Posts: 11039
Location: London
Reply with quote
jonbwfc wrote:
<wrinkles brow> Actually, wouldn't a 'repair permissions' from Disk Utility fix this?

Jon


I find terminal commands are quicker. There's a number of ways you can do it.

C

_________________
Still the official cheeky one ;)

jonbwfc wrote:
Caz is correct though


Fri May 20, 2011 2:36 pm
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 7:26 pm
Posts: 17040
Reply with quote
oceanicitl wrote:
jonbwfc wrote:
<wrinkles brow> Actually, wouldn't a 'repair permissions' from Disk Utility fix this?
Jon

I find terminal commands are quicker. There's a number of ways you can do it.

<Nods>. Certainly if you have a list of what bits to fix. In this case however it sounded like nobody knew quite what had been done, so it's worth considering letting the computer 'set everything back the way it should be' in one go rather than having to hunt down god-knows-what ACL changes down through his home directory tree.

Jon


Fri May 20, 2011 5:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.