LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-23-2007, 08:59 PM   #1
Eric952x
Member
 
Registered: Apr 2006
Location: Florida
Distribution: Ubuntu 10.04 & Linux Mint 9
Posts: 39

Rep: Reputation: 15
Cool External Hard Drive Permissions


I have an external hard drive that is formatted NTFS and was a back-up drive for my windows system. I use Ubuntu 7.04 now and want to use this drive but the permissions will only allow read only. I have tried to change the permission in a terminal as root but does not work. I then tried to change owner but could not do that either. Is there any way to use this drive with Ubuntu and not lose the data that is already stored on this drive?
eric
 
Old 11-23-2007, 10:00 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
For the NTFS and VFAT filesystems you can't use the chmod and chown command. You need to set the ownership or permissions of the entire filesystem in the mount command (or the /etc/fstab entries).

Here is an example. I have the "fuse" package and the "ntfs-3g" package installed. This allows read/write access. You could simply modeprobe "ntfs" and use "-t ntfs" instead.

Code:
sudo /sbin/modprobe fuse
jschiwal@hpamd64:~> sudo mount -t ntfs-3g /dev/sda1 /mnt/xp -o defaults,uid=jschiwal,dmask=007,fmask=117
jschiwal@hpamd64:~> ls -ld /mnt/xp
drwxrwx--- 1 jschiwal root 24576 Oct 21 02:59 /mnt/xp
The "uid=" option changes the ownership. The "dmask=" and "fmask=" options change the permissions of directories and files respectively. The numbers are octal and mask out (remove) the corresponding permission.
You can also use "gid=" to change the group. For both "uid=" and "gid=" you can use either the UID/GID number or the username/groupname.

Last edited by jschiwal; 11-23-2007 at 10:04 PM.
 
Old 11-24-2007, 08:26 PM   #3
Eric952x
Member
 
Registered: Apr 2006
Location: Florida
Distribution: Ubuntu 10.04 & Linux Mint 9
Posts: 39

Original Poster
Rep: Reputation: 15
Cool External Hard Drive Permissions

Thank You for the info I will give it a try.
Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to set write permissions on external hard drive. jpen8560 Linux - Hardware 19 03-22-2006 10:44 AM
no permissions to external hard drive Maxtor OneTouche II roler Linux - Hardware 4 11-08-2005 08:04 AM
Write permissions for external hard drive kg4ysy Linux - Hardware 1 05-19-2005 05:36 AM
external hard drive permissions djljjm Linux - Hardware 12 04-06-2005 01:23 PM
Setting permissions on an external USB hard drive so that all users can read from it? Pi Man Linux - Hardware 2 09-07-2004 09:50 PM


All times are GMT -5. The time now is 05:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration