View Full Version : USB drive and File Manager
JimRooney
12-08-2006, 04:02 PM
Hello all,
I have a USB drive working with my 770.
Everything works fine from the command line as I am root. Drive mounts and is read/write. The file manager runs as "User", so it treats the file system as read only. I would like to read/write from the file manager, but I can't figure out how to accomplish this.
Any ideas?
My setup:
Powered USB hub ... IO Gear USB 2.0 microhub
Ycable and female/female plugs to send power to the 770
60gig vFat unpowered external USB drive
Bluetooth Keyboard ... Think Outside Stowaway Universal
770 in RD mode, drive mounts read/write via command line
Thank you.
Jim
BanditRider
12-09-2006, 05:44 AM
what command do you use to mount it?
you should be able to add a line to /etc/fstab with the device name and mount point and the rw option
Then as user, mount mountpoint. i.e. if your mountpoint is /media/usb you'd enter mount /media/usb.
also make sure your mountpoint is writable by user.
JimRooney
12-09-2006, 03:04 PM
Thanks for the reply.
Fstab:
/dev/sda1 /mnt/hda vfat rw
/mnt/hda is owned by user and grouped by users
The drive mounts as before (with less typing by me :) ) but is still read only to the file manager (it's rw to command line). Perhaps I have something wrong in that fstab statement? Maybe I'm wrong and the file manager isn't runing as "User"?
Thanks again for your help
Jim
BanditRider
12-09-2006, 06:02 PM
Thanks for the reply.
Fstab:
/dev/sda1 /mnt/hda vfat rw
/mnt/hda is owned by user and grouped by users
The drive mounts as before (with less typing by me :) ) but is still read only to the file manager (it's rw to command line). Perhaps I have something wrong in that fstab statement? Maybe I'm wrong and the file manager isn't runing as "User"?
Thanks again for your help
Jim
You can auto-mount it at boot time by adding the mount line to the bottom of /etc/init.d/minircS
just before the exit 0.
Then add /mnt/hda to the umount line in /etc/init.d/minireboot and minishutdown to un-mount the drive when re-booting or shutting down.
chmod 777 /mnt/hda should make the mountpoint wide open (done as root)
Did you create the files on the drive as user or did you copy the files there while it was connected to a PC?
create a new file by typing: touch /mnt/hda/xxx
this will create a 0-byte file called xxx
ls -l should show this file as owned by user. Check who owns the other files.
If not user, enter chown -R user /mnt/hda1 as root.
you should be able to delete the file xxx with the File Manager.
Add umask=022 to the fstab line, like so:
/dev/sda1 /mnt/hda vfat rw,umask=022
That should do the trick.
JimRooney
12-12-2006, 05:31 PM
Before mounting, the mount directory /mnt/hda is owned by user and grouped by users
After mounting, it is root root
Trying to chown files returns: Operation not permitted
This is true for files created on the pc and files created with "touch"
I am root during all operations
My fstab is /dev/sda1 /mnt/hda vfat rw,umask=022
I've tried chmod 777
it does not error, but the file is left -rwxr-xr-xr-x
Weird eh?
I assume I'm missing something silly
BanditRider
12-12-2006, 07:52 PM
My mountpoints are owned by user and group root.
Do the chmod 777 on the mountpoint before the mount.
what does the /dev/sda1 line in /proc/mounts look like?
JimRooney
12-14-2006, 03:14 AM
Ah... no entry in /proc/mounts for sda1 (sda anything for that matter)... should there be?
The only thing close I can see is
usbfs /proc/bus/usb usbfs rw 0 0
Mountpoint is 777
Reverts to read only (other than root) after mounting
I'll try grouping root
Jim
rcull
12-14-2006, 07:10 AM
Try adding uid=xxx,gid=xxx to the line in fstab - sorry I havn't got my 770 here and can't remember what the user uid and gid are.
JimRooney
12-14-2006, 01:24 PM
Success!
Yes, uid=xxx,gid=xxx did the trick :)
fstab now reads...
/dev/sda1 /mnt/hda vfat rw,umask=022,uid=29999,gid=29999
(29999 being user of course)
The drive is now read/write from the file manager, notes, etc.
Thank you for your help guys :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.