Ask Your Question

OSX has taken over my external hard drive!

asked 2014-07-23 00:32:03 -0500

candonoharm gravatar image

updated 2014-09-28 23:49:56 -0500

mether gravatar image

I recently migrated to Fedora and bought an external drive to use as a backup. It worked fine, but earlier today I connected the drive to my macbook and now when i connect the drive to my Fedora computer, the drive is read only and it says I do not have permission to write. Can someone help me change the permissions back to what they were? I tried going back to the macbook and clicking on "info" and manually selecting that "everyone" has read/write access, but my fedora computer still can't write. Thanks in advance for your help - I'm a novice at this stuff.....

edit retag flag offensive close merge delete


After you attach the external HDD, open a terminal and paste the results of the commands df -h , sudo parted -l , rpm -qa ntfs\* , dmesg | tail -n30 Please edit your question and add the results there. Thanks

NickTux gravatar imageNickTux ( 2014-07-23 14:23:53 -0500 )edit

There is a typo in the dmesg @NikTh. It should be dmesg|tail -n 30. :)

abadrinath gravatar imageabadrinath ( 2014-07-25 01:18:52 -0500 )edit

There is no typo at tail, if that's what you meant. Try the command please (copy-paste it from here to your terminal). Thanks

NickTux gravatar imageNickTux ( 2014-07-25 09:50:13 -0500 )edit

i@NikTh - thanks for teaching me that! :) I'm still a newbie at Linux =D

abadrinath gravatar imageabadrinath ( 2014-07-25 17:54:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-23 02:13:04 -0500

abadrinath gravatar image

updated 2014-07-25 01:06:53 -0500

If you have just auto-mounted the external drive, use this command to find its location

df -h|tail -n 1|awk '{print $1 " "$6}'

Otherwise, just use

df -h
and choose the correct one. Copy that and paste here:
sudo mkdir /mnt/USB; sudo mount -t ntfs -o rw,auto,user,fmask=0000,dmask=0000 PASTE HERE 

for ntfs

sudo mkdir /mnt/USB; sudo mount -t vfat -o rw,auto,user,fmask=0000,dmask=0000 PASTE HERE 

for fat

Please make sure that the PASTE_HERE is not one of these:

  • /home
  • /etc
  • /var
  • /
  • /boot
  • /boot/efi
  • /run
  • /mnt
  • /sys/fs/cgroup
  • /tmp

EDIT: thanks for the suggestions @NikTh and @randomuser :)

edit flag offensive delete link more


How you are sure, that df -h will print at the last line the external drive that OP cares of ? If S/He has more than one external drives ? Also, the default permissions are not ugo+rwx, these permissions are not recommended to any directory. Last, but not least, what if the filesystem is fat32 or ntfs , it is likely to be one of them (by default), than a linux filesystem.

NickTux gravatar imageNickTux ( 2014-07-23 14:20:15 -0500 )edit

What permissions are recommended by default then? Note: I did test this on my NTFS external drive.

abadrinath gravatar imageabadrinath ( 2014-07-24 01:26:48 -0500 )edit

I have no doubt, that you've tested this before you post it, but what I want to say is that, better to ask the user for some informations, so you will be sure about the commands and what to answer. If the partitions is NTFS filesystem, the Linux chmod command has no impact. You have to use some mount options combined with ntfs or ntfs-3g to achieve permissions there. Also, a udev rule can be written about the drive (or any ntfs drive) for this purpose.

NickTux gravatar imageNickTux ( 2014-07-24 02:44:42 -0500 )edit

The last mounted file system will be last :). Check out my updated answer .

abadrinath gravatar imageabadrinath ( 2014-07-24 05:29:41 -0500 )edit

The df ( and ls ) parsing you've been posting is a neat trick, but they aren't really predictable. This one relies on the assumption that the USB drive in question was the most recently mounted one. This can easily change based on the user's intent or circumstances.

randomuser gravatar imagerandomuser ( 2014-07-24 08:03:19 -0500 )edit

Question Tools

1 follower


Asked: 2014-07-23 00:32:03 -0500

Seen: 363 times

Last updated: Jul 25 '14