Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a multi-boot system, currently running Xubuntu Dapper, 64 Studio, and, my newest addition, Zenwalk. I would like to be able to back up my files.
I used to be able to write to my external drive via USB but not e-SATA, and only on the Dapper install, not the 64 Studio (haven't tried it on Zenwalk yet). I tried it on 64 Studio as root.
The only way I could write to it in Dapper was to use the Sudo command to open the file manager, effectively running it as root. Then I could Cut/Copy/Paste to my heart's content (no drag and drop support, though).
Tragically, my Dapper install was overwritten when I installed Zenwalk. I have a new Dapper install now, and it doesn't write to the ext drive. When I try using the sudo mv command in the terminal, it tells me the drive is read-only. In the graphical file browser (default app is Thunar), the file icons have a lock symbol on them.
How come even root can't access this drive, and how do I give myself permission to write to it?
I had this problem a while ago, under similar circumstances. In my case it was a permissions thing. The error message was that I couldn't delete the file (say) because I didn't have permission to alter the parent directory.
I needed to change the ownership of the parent directory (/media/usbdisk in my case) so I could get read/write access to it's subjects.
The reason for this, I'm guessing, is something to do with the OS accessing the files is not the one that created them.
OTOH: I backed my /home directory to this drive under dapper, and I have full read/write access as a user under edgy.
Last edited by Simon Bridge; 12-15-2006 at 02:37 AM.
I had this problem a while ago, under similar circumstances...
I needed to change the ownership of the parent directory (/media/usbdisk in my case) so I could get read/write access to it's subjects.
I would like to know how you changed the ownership of the parent directory, and how to find out what the parent directory is.
I have noticed other quirks.
When I right click on the drive's icon and select 'properties', sometimes it says the owner is root. Other times, if I unmount and remount, it will show the owner as my username and my real name, with read and write permissions--but I still can't write.
It also shows the group as 'me' (my username) with read only.
I tried going through Applications > System > Users and Groups to change permissions of the 'me' group, but can't see any way to change them. I also added 'me' to the 'root' and 'disk' groups. I hope that isn't dangerous. I don't want to have full root privileges when I log on as 'me'.
I was hoping to get the Zenwalk manual onto the drive so I could access it from Zenwalk, which doesn't have Internet access yet. I could burn a CD or print out pages, I guess.
Perhaps you need to mount the drive with the proper permissions.
You can do this through fstab (/etc/fstab).
Add rw (read write) to the options of the drive in question, as well as umask=000.(the umask is the default file creation permission)
if you mount with options umask=000 and rw, the resulting permission should be rw for root. YOu can add "users " if you want users to be able to write to the drive.
"umount /dev/whatever" and then "mount /dev/whatever"
I can open it with the file manager and drag/drop files from it, but I can't drag/drop to it.
Where can I find the details of adding a drive to /etc/fstab?
Can I add it such that eSATA will work? That would be sweet. I bought an enclosure with this capablility, but so far only USB mounts. It won't boot the computer if I have it plugged in to the eSATA port, but if I boot first and then plug it in it is not recognised.
Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 23586 189454513+ 83 Linux
/dev/sdb2 23587 24792 9687195 b W95 FAT32
pad@Aurora2:~$
64 Studio (Debian) and Zenwalk (Slackware) both return a "command not found" error for fdisk.
I notice fdisk can't seem to find my main internal SATA drive.
You can see I was able to partition the external drive via USB before it stopped working. The FAT 32 was so I could transfer family files bewteen Windows boxes.
I wish "plug and play" was as much a reality in Linux as it is in other OS's. I'd like to spend less time fixing the computer and more time getting work done on it.
hmm... I don't think I can help you with the SATA part, but if you could at least get it working...
OK, so what you posted from fstab and fdisk are form the same system (distribution) right?
The disk you want to be able to write to is sdb, correct?
Then what I would do is add each partition (sdb1 sdb2) to you fstab. Some thing like this:
Code:
/dev/sdb1 /whatever/youwant auto users,rw,umask=000 0 0
/dev/sdb2 /what/ever auto rw,users,umask=000 0 0
Instead of "auto", you would probably want the proper fstab entries for the corresponding partition types (fat23, etc). Check man fsatb for this... I don't know the entries by heart.
You will probably have to set up the mount points manually: as root, simply mkdir /whatever/youwant.
notice the "users" "rw" and "umask=000" options are important, as explained above.
YOu would have to do this for each distribution that wants to access the external hard drive, (but with the proper /dev/sd??, configuration!)
Cheers
Matt
PS: if you get command not found for fdisk, make sure you are running as root.
I tried making a directory and using that as the mount point,
sudo mkdir /mnt/blu
Then (as sudo) using the text editor to add
/dev/sdb1 /mnt/blu ext3 users,rw,umask=0000 0 0
to /etc/fstab, and saving, then rebooting for good measure.
I still couldn't write to the drive, so I changed the mount point to the the file path that the file browser uses to open the drive:
That didn't work either. I can drag and drop files from the external drive to the system drive, but not the other way around. From the command line, I get this:
I'll reiterate that the "properties" box says the user "pad" is the owner and has read and write privileges. That's the same as before. [edit] Just tried it in Slackware/Zenwalk. "Failed to open directory USB. Permission denied".
... that was with the drive mounted manually. With udev handling the mount automatically, that last line becomes:
Code:
/dev/sda1 /media/usbdisk ext3 rw,nosuid,nodev 0 0
Oh yeah...
[quote=Bazbo]I would like to know how you changed the ownership of the parent directory, and how to find out what the parent directory is.[quote]It's the mountpoint - browse the fs using the terminal, use cd .. and ls -l, until you find the directory which you don't have rw access to. For me, that was /media/usbisk.
Change ownership with "chown" and permissions with "chmod" as usual.
Last edited by Simon Bridge; 12-19-2006 at 02:27 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.