LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 11-22-2005, 04:02 PM   #1
theufman
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Rep: Reputation: 0
Question Changing permissions on USB external drives


I am running suse 10 on my laptop and I'm having issues with usb.

I have an external hard drive enclosure with a 160GB hard drive that I would like to have complete access. I can read from it, but I cannot write to it. Its permission settings are 555. When I try to copy something, I get an error saying the drive is read-only. I have reviewed many posts somewhat relating to this, but I could not get any to work.

Here is my /etc/fstab:

/dev/hda6 / reiserfs acl,user_xattr 1 1
/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hda2 /windows/D vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hda3 /windows/E vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hda5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/dvdrecorder /media/dvdrecorder subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
none /subdomain subdomainfs noauto 0 0

Any ideas?

-Mike
 
Old 11-22-2005, 04:18 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
What filesystem is on the drive? For 160GB, Windows won't let you format with anything but NTFS, which still doesn't have good write support, so it's disabled. Linux will let you create a FAT32 partition that size (with a huge block size), and it will work under Windows - perhaps you need to reformat it?

If that's not the problem, how do you actually mount the drive? It might be mounting read-only by default (leading to the 555 permissions), which means you'll need to change that somewhere. Are you mounting it by hand, or via an automounter?
 
Old 11-22-2005, 05:15 PM   #3
theufman
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Original Poster
Rep: Reputation: 0
The file system is fat32 and it is being automounted. I should clarify, the permission on the file is 500, but I can read the files as a user. When I try to add something to the hard drive, I get an error saying I haven't permission. When I use root, I do the same thing but the returned error is that I cannot write to a read-only disk.
 
Old 11-22-2005, 07:19 PM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
When you say the file has 500 permissions, what file are we talking about? The device file itself, or the directory it's mounted under? You do realise that 500 permissions means you can't write to it as any user?

I would suggest you check out your automounter docs to see how to mount the drive read/write automatically, or try to do it yourself from the command line, something like "mount (device) -o remount rw". You might need to add another option to force ownership of the mounted system.

I know FAT doesn't support permissions, but I would expect linux to enforce no writes to a read-only system.
 
Old 11-22-2005, 07:54 PM   #5
theufman
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Original Poster
Rep: Reputation: 0
The permission setting is odd. When I look at the files on the HD, they and the folders on that HD have a permission setting of 500. Oddly enough, I can read these files as a user as well.

Any direction as to where in YaST I may be able to change automount settings? I'l be looking into it for the meantime.

Thanks for your patience.

-Mike
 
Old 11-22-2005, 08:42 PM   #6
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
It's not odd if your user is the one that owns the files, but it'd be odd if root owned the files and you could still read them. Who owns the files when you ls -l them?

Sorry, I don't know much about YaST, but you could check out this howto which may help figuring it out. Also, check the man pages for "autofs" and "auto.master".
 
Old 11-23-2005, 05:47 AM   #7
neranjana
Member
 
Registered: Jul 2003
Location: Sri Lanka
Distribution: Mandrake
Posts: 99

Rep: Reputation: 15
Hi

I have a similar problem with a 60 GB USB hard disk and Mandriva 2006 on my laptop. I posted it at http://www.linuxquestions.org/questi...73#post1965173

I noticed that the system throws an error when the hard drive is being accessed and the device is mounted read only. I checked /var/log/messages. I used tail -f /var/log/messages in a console after su and got the messages. I posted the messages in the above mentioned post in linuxquestions. Can you also check what messages you get in that file when you try to access the hard disk for the first time after plugin it in? In my case no matter what options you use to mount it the system mounts it read only because there is a problem.

Thanks

Neranjana
 
Old 11-28-2005, 03:06 AM   #8
theufman
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Original Poster
Rep: Reputation: 0
I feel so clueless ... I got my hard drives confused ... they were in fact NTFS partitioned hard drives ... so a pertinent question would be, is there a program, windows or otherwise, that can repartition the hard drive and maintain the data on the hard drive?
 
Old 11-28-2005, 04:44 PM   #9
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
I believe Partition Magic can do it, but I've never used it for this myself, and could be troublesome (Microsoft really don't want you moving away from NTFS). You would probably be better off backing up the data and reformatting, if you have the space for it.
 
Old 11-29-2005, 10:08 PM   #10
neranjana
Member
 
Registered: Jul 2003
Location: Sri Lanka
Distribution: Mandrake
Posts: 99

Rep: Reputation: 15
Hi

I managed to solve the problem with my 60 GB usb mobile hard disk. My situation was, when I bought the 60 GB 2.5" Samsung usb mobile (gets power from usb itself and no external power) it was formatted with FAT32. But I noticed that with Mandrake 10.0 it was very slow and did not seem to comply with USB High speed but seemed to be USB full speed (high speed is faster than full speed). So I tried to format it using windows. But Windows could only format one partition up to 40 GB with FAT 32. But I did not want to have two partitions because Mandrake 10.0 would auto mount a removable hard disk only if the hard disk had one partition. So I formatted the entire hard disk using Mandrake 10.0 with FAT 32. It worked on both Windows and Linux but with Linux it was slow. Then when I got Mandriva 2006, I noticed the USB hard disk was extremely fast (high speed) but was read-only. The message log showed that the system found something illegal in the file system and it mounted the disk readonly. So I backed up the data on to another hard disk (since I could read the disk) and deleted the partition and created a new partition with all 60 GB and tried to format it with FAT 32 using Mandriva 2006. This time like in windows, the system refused to format the partitions. Then I split the disk in to two partitions roughly 30 GB each and formatted with FAT 32. It worked. Now the partitions get mounted in read write mode in Linux. With Mandriva 2006, both partitions get mounted automatically unlike in old Mandrake 10.0. So it seems the new linux refuses to mount FAT partitions larger than 40 GB. So try to split your disk into partitions smaller than 40 GB and format them. It should work. 40 GB seems to be the magic number in FAT 32. NTFS would not be mounted under Linux in read write mode by default. If you want to write to NTFS I believe you have to change a kernel module or something but it seems NTFS writing under Linux is still dangerous and you might loose the data in the entire partition.

Neranjana
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM with external USB drives pompeyjohn Linux - Hardware 0 10-01-2005 02:56 AM
Changing permissions on cdrom and dvd drives Telman Mandriva 23 09-10-2005 05:50 PM
USB External Hard drives lukepiewalker Fedora 2 08-03-2005 10:14 AM
External USB drives in redhat? ultrablue Linux - Newbie 3 06-10-2005 05:16 AM
changing permissions on mounted drives. Moses420ca Linux - Newbie 2 07-04-2003 09:17 AM


All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
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