Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Old 06-30-2009, 01:53 PM   #1
elcappn
Prospect
 
Join Date: Jun 2009
Posts: 3
Can't Change Permissions or Ownership on an external drive

I can't access my external drive. When I try to open the the drive I get an error that I do not have sufficient access privileges. When I get info on the drive, it says that I have custom access, but I am unable to change any permissions after authenticating.

Is this something that can be fixed in the terminal, or single user mode?

I've tried a couple of applications that are supposed to do this (FileXaminer and Super Get Info), but they haven't worked so far.

I'd appreciate any help anyone can offer.
elcappn is offline   Reply With Quote
Old 06-30-2009, 02:28 PM   #2
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
Can we see the results of the following commands, copy/pasted into your Terminal?

# If your computer is running OS X 10.4.x Tiger or earlier:

ls -alo /Volumes
id
echo "done"


# If your computer is running OS X 10.5.x Leopard or later:

ls -alOe /Volumes
id
echo "done"


Also, please tell us what name you have given this drive, what filesystem it is formatted in (like HFS+, FAT32, NTFS, ext2, etc.), and what was done to the drive immediately before you could no longer access it.

Trevor

Last edited by trevor; 03-25-2011 at 12:35 PM.
trevor is offline   Reply With Quote
Old 06-30-2009, 02:48 PM   #3
elcappn
Prospect
 
Join Date: Jun 2009
Posts: 3
Here is what the terminal said:

Code:
Last login: Tue Jun 30 12:37:58 on ttys000
Chris-Pecks-BFA-Mac-Pro:~ chrispeck$ ls -alO /Volumes
total 8
drwxrwxrwt@  6 root       admin  hidden  204 Jun 30 12:08 .
drwxrwxr-t+ 42 root       admin  -      1496 Jun 30 08:43 ..
drw-------@ 25 chrispeck  staff  uchg    918 Jun 26 14:52 Chris_Vir2 Production
drwxrwxr-x  11 chrispeck  staff  -       442 Jun 30 12:26 Mac HD
lrwxr-xr-x   1 root       admin  -         1 Jun 30 12:08 Macintosh HD -> /
drwxrwxrwx  17 chrispeck  staff  -       646 Jun 29 20:28 My Passport
Chris-Pecks-BFA-Mac-Pro:~ chrispeck$ id
uid=501(chrispeck) gid=20(staff) groups=20(staff),98(_lpadmin),80(admin)
Chris-Pecks-BFA-Mac-Pro:~ chrispeck$ echo "done"
done
The drive I'm having the problem with is Chris_Vir2 Production. It's an HFS+ drive. The only thing that I did yesterday before I couldn't access the drive anymore was change permissions on a folder in my application support folder. After I hit apply to enclosed items, I could no longer access the drive and now good chunk of applications now unexpectedly quit upon launch.

Last edited by trevor; 06-30-2009 at 03:02 PM. Reason: Added [code] tags for readability
elcappn is offline   Reply With Quote
Old 06-30-2009, 03:12 PM   #4
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
Code:
drw-------@ 25 chrispeck  staff  uchg    918 Jun 26 14:52 Chris_Vir2 Production
OK, we should be able to easily fix this for you. Your permissions are a little bit too restrictive, but more importantly you've got the user immutable flag set (indicated by the 'uchg' I've highlighted in red above). Copy/paste the following commands into your Terminal:

sudo chflags nouchg /Volumes/"Chris_Vir2 Production"
sudo chmod 755 /Volumes/"Chris_Vir2 Production"
ls -alO /Volumes
echo "done"


You will be asked for your admin password. Enter it at the prompt. As you enter your admin password, nothing will be echoed back to the screen. This is a normal security precaution. If you've never used the sudo command before, you will get a warning about the potential dangers of using sudo. Read the warning--it's very true, and it's dangerous to enter commands that start with 'sudo' if you don't understand what they do.

The first command above removes the 'uchg' flag, which is the user immutable flag, from your "Chris_Vir2 Production" volume.

The second command above makes the permissions on that drive less restrictive. After issuing that command, the permissions should look like
drwxr-xr-x, which is the same permissions as "Macintosh HD". (You may notice that Macintosh HD permissions begin with an 'l' instead of 'd'. That is because Macintosh HD is a link to the root directory, '/'.)

The third command just issues another directory listing of your /Volumes directory, so you can verify the new permissions, and that the 'uchg' flag is gone. And the fourth command is padding, to make it easier when you copy/paste to make sure all the commands are entered.

Let us know if that fixes you up!

Trevor
trevor is offline   Reply With Quote
Old 06-30-2009, 03:58 PM   #5
elcappn
Prospect
 
Join Date: Jun 2009
Posts: 3
Yes!!! That worked.

Thank you so much, Trevor.
elcappn is offline   Reply With Quote
Old 07-12-2009, 12:16 AM   #6
kmilkman
Registered User
 
Join Date: Jul 2009
Posts: 1
I'm having the same sort of problem. I'm trying to access the "My Book" external drive. It's formatted in Mac OS Extended. You have any ideas on how I can get writing privileges?

Code:
Kevin-Loudermilks-MacBook-Pro:~ kmilkman$ ls -alO /Volumes
total 56
drwxrwxrwt@  6 root      admin  hidden   204 Jul 11 22:17 .
drwxr-xr-t  37 root      admin  -       1326 Jul  4 15:44 ..
-rw-r--r--@  1 kmilkman  admin  hidden  6148 Jul  7 00:24 .DS_Store
lrwxr-xr-x   1 root      admin  -          1 Jul 11 21:38 Macintosh HD -> /
drwxr-xr-x  20 kmilkman  staff  -        748 Jul 12  2009 My Book
drwxrwxrwx   1 kmilkman  staff  -      16384 Jul 11 21:38 WINDOWS XP
Kevin-Loudermilks-MacBook-Pro:~ kmilkman$ id
uid=501(kmilkman) gid=20(staff) groups=20(staff),98(_lpadmin),81(_appserveradm),100(_lpoperator),79(_appserverusr),80(admin),101(com.apple.sharepoint.group.1)
Kevin-Loudermilks-MacBook-Pro:~ kmilkman$ echo "done"
done
kmilkman is offline   Reply With Quote
Old 07-13-2009, 12:21 PM   #7
ChrisJon
Registered User
 
Join Date: Jul 2009
Posts: 1
Thumbs up Thanks for info Trevor

I just found this post and it was just what I needed to fix ownership on my external drive. Thank you Trevor for the tip on the "uchg" flag and how to fix it.

Thanks,
Chris
ChrisJon is offline   Reply With Quote
Old 08-06-2009, 10:27 AM   #8
vvaz
Prospect
 
Join Date: May 2009
Location: Portugal
Posts: 3
Hello

I am not able to change the permitions on my external disk. I pasted that code on my terminal, but nothing happens.

Here are my pasted text

Code:
p03tobeilv:~ valeriovaz$ ls -alO /Volumes
total 16
drwxrwxrwt@  5 root        admin  hidden  170  6 Ago 15:50 .
drwxrwxr-t  37 root        admin  -      1326  6 Ago 15:51 ..
drwxr-xr-x   1 valeriovaz  staff  -      4096  5 Ago 18:38 1tb
lrwxr-xr-x   1 root        admin  -         1  4 Ago 02:20 Macintosh HD -> /
drwxrwxr-x  45 valeriovaz  staff  -      1598  5 Ago 15:16 Projectos
p03tobeilv:~ valeriovaz$ id
uid=501(valeriovaz) gid=20(staff) groups=20(staff),98(_lpadmin),81(_appserveradm),101(com.apple.sharepoint.group.1),79(_appserverusr),80(admin)
p03tobeilv:~ valeriovaz$ echo "done"
done
can you guys help me? (the external disk is "1tb")
vvaz is offline   Reply With Quote
Old 08-06-2009, 11:25 AM   #9
SirDice
MVP
 
Join Date: Aug 2009
Posts: 1,119
Quote:
Originally Posted by vvaz
I pasted that code on my terminal, but nothing happens.

That's correct. It only supplies us with some information about your setup.

If I look at the output your user id has read/write access to the drive. What's the exact problem?
SirDice is offline   Reply With Quote
Old 08-06-2009, 11:32 AM   #10
vvaz
Prospect
 
Join Date: May 2009
Location: Portugal
Posts: 3
Problem was:

the external HDD was NTFS. (i had MacFuse installed and everything worked fine).

Then, when i was listening some music in iTunes, some guy disconnected from my USB.

When i plugged back in, it was a read-only disk.

Tryed to change the ownership and the permitions to 777 but i couldnt.

So, i got the user "root" up and running, and tryed again. Nothing happened.

My solutionn for the problem: Connect the HDD to Windows, change the permitions to 777. Now it works again.
vvaz is offline   Reply With Quote
Old 08-12-2009, 09:13 AM   #11
hsaldin
Prospect
 
Join Date: Aug 2009
Posts: 1
Dear All I have the same problem and I do this steps but nothing happend, and bellow is my terminal window data

Code:
cosmics-mac-pro:~ cosmic$ ls -alO /Volumes
total 72
drwxrwxrwt@  8 root    admin  hidden   272 Aug 12 16:48 .
drwxrwxr-t@ 37 root    admin  -       1326 Aug 11 23:41 ..
drwx------@ 28 cosmic  staff  -        908 Aug 11 14:34 COSMIC
lrwxr-xr-x   1 root    admin  -          1 Aug 12 14:45 Macintosh HD -> /
drw-rw-rw-@ 46 cosmic  501    uchg    1632 Jun 23 11:31 MyBook
drwxrwxrwx   3 cosmic  admin  -        102 Jul 29 10:00 PUBLIC
drwxrwxrwx   1 cosmic  staff  -      16384 Aug 12 16:46 PUBLIC-1
drwxrwxrwx   1 cosmic  staff  hidden 16384 Aug 12 14:53 cosmic-ibm
cosmics-mac-pro:~ cosmic$ id
uid=501(cosmic) gid=20(staff) groups=20(staff),98(_lpadmin),80(admin)
cosmics-mac-pro:~ cosmic$ echo "done"

Last edited by trevor; 08-13-2009 at 12:59 PM. Reason: Put Terminal output inside of [code] tags for readability
hsaldin is offline   Reply With Quote
Old 08-13-2009, 12:55 PM   #12
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
Quote:
Originally Posted by kmilkman
I'm having the same sort of problem. I'm trying to access the "My Book" external drive. It's formatted in Mac OS Extended. You have any ideas on how I can get writing privileges?

Code:
Kevin-Loudermilks-MacBook-Pro:~ kmilkman$ ls -alO /Volumes
total 56
drwxrwxrwt@  6 root      admin  hidden   204 Jul 11 22:17 .
drwxr-xr-t  37 root      admin  -       1326 Jul  4 15:44 ..
-rw-r--r--@  1 kmilkman  admin  hidden  6148 Jul  7 00:24 .DS_Store
lrwxr-xr-x   1 root      admin  -          1 Jul 11 21:38 Macintosh HD -> /
drwxr-xr-x  20 kmilkman  staff  -        748 Jul 12  2009 My Book
drwxrwxrwx   1 kmilkman  staff  -      16384 Jul 11 21:38 WINDOWS XP
Kevin-Loudermilks-MacBook-Pro:~ kmilkman$ id
uid=501(kmilkman) gid=20(staff) groups=20(staff),98(_lpadmin),81(_appserveradm),100(_lpoperator),79(_appserverusr),80(admin),101(com.apple.sharepoint.group.1)
Kevin-Loudermilks-MacBook-Pro:~ kmilkman$ echo "done"
done

Your user, kmilkman, already has write access to the "My Book" volume. To give write access to the root directory of "My Book" to every user in the admin group, you can use the commands
chgrp admin /Volumes/"My Book"
chmod g+w /Volumes/"My Book"
echo "done"


To give write access to the root directory of "My Book" to every user on the computer, you can use the command
chmod a+w /Volumes/"My Book"
echo "done"


However, since your question seems to indicate that you don't currently have write privileges to that volume, I wonder if the problem isn't with the root directory of that volume, but just with some folders inside that volume?

Maybe if you gave us a lot more detail about exactly what problem you are seeing, we could give you better help.

Trevor
trevor is offline   Reply With Quote
Old 08-13-2009, 01:08 PM   #13
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
Quote:
Originally Posted by hsaldin
Code:
cosmics-mac-pro:~ cosmic$ ls -alO /Volumes
total 72
drwxrwxrwt@  8 root    admin  hidden   272 Aug 12 16:48 .
drwxrwxr-t@ 37 root    admin  -       1326 Aug 11 23:41 ..
drwx------@ 28 cosmic  staff  -        908 Aug 11 14:34 COSMIC
lrwxr-xr-x   1 root    admin  -          1 Aug 12 14:45 Macintosh HD -> /
drw-rw-rw-@ 46 cosmic  501    uchg    1632 Jun 23 11:31 MyBook
drwxrwxrwx   3 cosmic  admin  -        102 Jul 29 10:00 PUBLIC
drwxrwxrwx   1 cosmic  staff  -      16384 Aug 12 16:46 PUBLIC-1
drwxrwxrwx   1 cosmic  staff  hidden 16384 Aug 12 14:53 cosmic-ibm
cosmics-mac-pro:~ cosmic$ id
uid=501(cosmic) gid=20(staff) groups=20(staff),98(_lpadmin),80(admin)
cosmics-mac-pro:~ cosmic$ echo "done"

I see several potential problems there, but I assume that the one you're talking about is with the volume "MyBook"? If so, try the commands below:

chflags nouchg /Volumes/MyBook
chmod 755 /Volumes/MyBook
chgrp admin /Volumes/MyBook
echo "done"


The first command removes the uchg user immutable flag from that volume. The second adds write permissions to the owner (cosmic) and makes the rest of the permissions more 'normal'. The third adds a valid group owner, admin, to the volume--it's currently set at the gid of 501 which apparently no longer exists as a valid group on your computer. If you wanted, you could set the group owner to staff instead of admin, just make that third command chgrp staff /Volumes/MyBook instead.

Trevor

Last edited by trevor; 08-13-2009 at 01:25 PM.
trevor is offline   Reply With Quote
Old 08-13-2009, 01:46 PM   #14
SirDice
MVP
 
Join Date: Aug 2009
Posts: 1,119
Or if you want to add that 501 group again (which was probably called the same as your username):
Code:
# dscl
Entering interactive mode... (type "help" for commands)
> create /Local/Default/Groups/cosmic PrimaryGroupID 501
And use the System Preferences -> Accounts to set cosmic as your primary group.
SirDice is offline   Reply With Quote
Old 08-17-2009, 01:33 PM   #15
kindaskimpy
Registered User
 
Join Date: Aug 2009
Posts: 1
Sigh

I'm about as frustrated as can be. I have no idea how or when or why it happened but the two external volumes I have, one containing my Media and another one which is my Time Machine backup have changed their permissions and will not allow me in. I can't read or write to them and it scares me because all of my information is in there! My computer is currently empty and I need to restore it from the Time Machine backup but I can't access it! Please help! This is what I see when I type the command: ls -alO /Volumes


PHP Code:
drwxrwxrwt@  5 root         admin  hidden  170 Aug 17 14:24 .
drwxrwxr-t  30 root         admin  -      1088 Aug 17 14:09 ..
lrwxr-xr-x   1 root         admin  -         1 Aug 17 14:03 Macbook Pro -> /
drwxr-xr-x18 kindaskimpy  admin  -       680 Aug 16 10:49 Media
drw
-rw-r--+ 13 kindaskimpy  staff  uchg    510 Aug 16 18:44 Time Machine 
Please please please help. I don't want to lose everything.
kindaskimpy is offline   Reply With Quote
Old 11-18-2009, 08:16 AM   #16
donn
Registered User
 
Join Date: Nov 2009
Location: Canada
Posts: 1
I had a problem seeing an external drive.
I found this forum and found the right answer.
I have now joined and I'm looking forward to contributing.
Thanks
donn is offline   Reply With Quote
Old 01-27-2010, 02:11 PM   #17
footandmaff
Prospect
 
Join Date: Jan 2010
Posts: 5
Hi, I'm having a similar problem, but it's restricted to just one folder on my external hard drive called OpenShare. I'm currently able to make and edit folders and files on the whole drive apart from the one folder. At the moment I have read access to the folder but every time I try and change it it just goes back to read access.

I've used the code below:

Code:
ls -alO /Volumes
id
echo "done"
and I got:

Code:
alex-s-macbook-pro:~ Alex $ ls -alO /Volumes
total 8
drwxrwxrwt@  4 root   admin  hidden  136 27 Jan 18:49 .
drwxrwxr-t  49 root   admin  -      1734 27 Jan 18:21 ..
lrwxr-xr-x   1 root   admin  -         1 27 Jan 18:21 Macintosh HD -> /
drwxrwxrwx@  8 Alex   Alex   -       264 27 Jan 19:19 OpenShare
Any assistance anyone can provide would be great. I'm running Snow Leopard if that makes any difference!

Thanks
footandmaff is offline   Reply With Quote
Old 01-28-2010, 01:02 AM   #18
erd3x
Guest
 
Posts: n/a
Same problem

Hi there,

hope you can help all my disk have locked up all formatted MAC OS extended.
I think it happened when i created a new user as I was having problem accessing my disks from my MacBook.

Thanks in advance.

Here's my results :

Code:
Last login: Thu Jan 28 06:50:53 on ttys000
[imac:~] ianmacki% ls -alO /Volumes
total 16
lrwxrwxr-x+  1 root      admin  -         1 27 Jan 09:35 * iMac 500GB -> /
drwxrwxr-x@  8 root      admin  hidden  272 27 Jan 17:22 .
drwxrwxr-x@ 85 root      admin  -      2958 28 Jan 06:39 ..
drw-rw-r--@ 41 ianmacki  staff  uchg   1462 13 Jan 08:12 LACIE 500GB
drw-rw-r--@ 17 ianmacki  staff  uchg    646 11 Jan 10:27 LaCie Silver Time Machine 250GB
drw-rw-r--@ 19 ianmacki  staff  uchg    714 12 Jan 20:24 STARK 1TB
drw-rw-r--+ 17 ianmacki  staff  uchg   1122 25 Jan 13:58 erd
lrwxrwxr-x+  1 ianmacki  admin  -        12 27 Jan 09:37 iDisk -> /Volumes/erd
[imac:~] ianmacki% id
uid=501(ianmacki) gid=20(staff) groups=20(staff),401(com.apple.access_screensharing),404(com.apple.sharepoint.group.7),101(com.apple.sharepoint.group.1),402(com.apple.sharepoint.group.5),204(_developer),100(_lpoperator),98(_lpadmin),80(admin),61(localaccounts),12(everyone),403(com.apple.sharepoint.group.6),104(com.apple.sharepoint.group.4),102(com.apple.sharepoint.group.2),103(com.apple.sharepoint.group.3)
[imac:~] ianmacki% echo "done"
done
[imac:~] ianmacki%

Last edited by trevor; 01-29-2010 at 01:58 PM. Reason: added [code] tags around terminal output
  Reply With Quote
Old 01-29-2010, 01:45 PM   #19
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
Quote:
Originally Posted by kindaskimpy
Code:
]drwxrwxrwt@  5 root         admin  hidden  170 Aug 17 14:24 .
drwxrwxr-t  30 root         admin  -      1088 Aug 17 14:09 ..
lrwxr-xr-x   1 root         admin  -         1 Aug 17 14:03 Macbook Pro -> /
drwxr-xr-x+ 18 kindaskimpy  admin  -       680 Aug 16 10:49 Media
drw-rw-r--+ 13 kindaskimpy  staff  uchg    510 Aug 16 18:44 Time Machine

sudo chflags nouchg /Volumes/"Time Machine"
sudo chmod 775 /Volumes/"Time Machine"
echo "done"


Trevor
trevor is offline   Reply With Quote
Old 01-29-2010, 01:57 PM   #20
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,560
Quote:
Originally Posted by footandmaff
Hi, I'm having a similar problem, but it's restricted to just one folder on my external hard drive called OpenShare. I'm currently able to make and edit folders and files on the whole drive apart from the one folder. At the moment I have read access to the folder but every time I try and change it it just goes back to read access.

I've used the code below:

Code:
ls -alO /Volumes
id
echo "done"
and I got:

Code:
alex-s-macbook-pro:~ Alex $ ls -alO /Volumes
total 8
drwxrwxrwt@  4 root   admin  hidden  136 27 Jan 18:49 .
drwxrwxr-t  49 root   admin  -      1734 27 Jan 18:21 ..
lrwxr-xr-x   1 root   admin  -         1 27 Jan 18:21 Macintosh HD -> /
drwxrwxrwx@  8 Alex   Alex   -       264 27 Jan 19:19 OpenShare
Any assistance anyone can provide would be great. I'm running Snow Leopard if that makes any difference!

Thanks

What folder on your OpenShare volume is having the problem? Where is it on OpenShare? Can we see

ls -alOe /Volumes/OpenShare/Path/to/Problem/Folder

...where Path/to/Problem/Folder is the actual path to that problematic folder?

Trevor
trevor is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:39 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.