MandrivaUsers.org : Using external USB disks and Linux partitions - MandrivaUsers.org

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Using external USB disks and Linux partitions Howto

#1 User is offline   ianw1974 

  • Platinum
  • View blog
  • Group: Admin
  • Posts: 13,536
  • Joined: 09-March 05

Posted 25 August 2008 - 11:13 AM

I'd recently decided to drop FAT32/NTFS from my external 160GB disk, because of accessibility problems. FAT32 isn't good for disks larger than 30GB and isn't great anyway because of defragmentation. NTFS was better, but found that depending on my distro, I wouldn't generally have write support unless NTFS-3G was installed. Both use umask=0 to get around problems with normal users reading/writing to the disk.

I've since changed it to ext3, and found that by default, since root is mounting it via udev, that the disk was read-only for my one particular user. I don't have any other users, which is why I never fixed the permissioning under udev, or wrote my own rule. A nice simple way though is this.

1. Plug your disk to your computer, udev will then auto-mount it to /media/disk or whatever.
2. Change the permissions by doing:

chown -R username:username /media/disk
chmod -R 775 /media/disk


now, I can access the disk, and all files are owned by me. Any other users could essentially save here since I changed read/write/execute permissions on the disk. Simple, yet effective. I chose ext3 as the partition, because I can use the ext2ifs driver in Windows if I want to mount and access the disk. Under Windows though, it's read as ext2, so if you did use ext3, you have to make sure the disk was unmounted properly, otherwise Windows won't read it. But then, the same happens to NTFS partitions if you didn't unmount them safely in Windows first.

Obviously, replace username with your username.
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

#2 User is offline   pindakoe 

  • frequent
  • Group: Members
  • Posts: 179
  • Joined: 21-December 06

Posted 25 August 2008 - 07:20 PM

Is this permanent, i.e. what happens if you disconnect the external harddisk and remount it later or after a reboot. Is /media/disk still owned by username:username or does it get re-created by udev (which I think is what is hapening)? I haven't really gotten my arms around udev rules, so any starting points appreciated.
0

#3 User is offline   ianw1974 

  • Platinum
  • View blog
  • Group: Admin
  • Posts: 13,536
  • Joined: 09-March 05

Posted 25 August 2008 - 08:04 PM

Yes, it's still owned by username:username, at least it was for me. I didn't do anything else, other than what I did here, and it always kept the username:username and permissions.
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users