OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Sharp ROMs => Topic started by: havoc on April 14, 2004, 04:39:22 pm
-
Something happened to by SL-5600 the other day that caused /usr/mnt.rom/cf to become owned by root. (/usr/mnt.rom/card is owned by zaurus.) Now, all files on my cfcards are likewise owned by root. That means I can\'t write to the cf card as the normal user, and I cannot delete files as the normal user.
I am not able ot change the owner of the mount point because it is part of \'/\', which is mounted read only. Likewise, I cannot delete the mount point and recreate it. I cannot umount /mnt/cf/, and remount it as zaurus because only root is allowed to mount that mountpoint.
I\'ve pretty much tried everything I can think of to restore full read and write permission for the normal user for the cfcard, and I\'m stumped. Is there anything short of reformatting the Z to allow be full access to that mount point again?
thanks,
havoc
-
Hi!
I think, you just have to do
mount -n -o remount,rw /
and then you can change the owner of the mount point.
To make it read-only again, do
mount -n -o remount,ro /
jabbath
-
jabbath, thanks... apparently, there is something else going on here.
when /usr/mnt.rom/cf is unmount, it now belongs to zaurus:qpe. When I insert the card, it switches back to root:root.
I inserted the card into my notebook, mounted it, and it works correctly with defaultuser:users as owner:group. I tested with a spare card, and got exactly the same results of owner switching to root:root when inserted.
Could I have screwed up something in the config files?
-
I think, you have to make the device (/dev/hda1) owned by your user (zaurus) or a group, in which zaurus is in.
Your /etc/fstab should have the entry \"/dev/hda1\" with the option \"noauto,owner\".
jabbath
-
I don\'t think it matters who owns the mount point (at the very least altering the ownership to zaurus won\'t solve your troubles). You need to add more options (the UID and GID) to the mount settings in fstab. Take a google or look at the man page for fstab.
Simon
-
jabbath, I\'m conflicted... as is my Z.
From /etc/fstab (I include the line for /dev/mmcda1 for comparison):
/dev/hda1 /mnt/cf auto noauto,owner 0 0
/dev/mmcda1 /mnt/card auto noauto,owner 0 0
ls of /dev for hda* (incomplete) and mmcda*:
brw-rw---- 1 root operator 3, 0 Aug 1 2003 /dev/hda
brw-rw---- 1 root operator 3, 1 Aug 1 2003 /dev/hda1
[etc]
brw-r--r-- 1 root root 60, 0 Aug 1 2003 /dev/mmcda
brw-r--r-- 1 root root 60, 1 Aug 1 2003 /dev/mmcda1
brw-r--r-- 1 root root 60, 2 Aug 1 2003 /dev/mmcda2
Interestingly, looking at the /etc/group file, I see that group \"operator\" has no members, nor does group \"qpe\". From the group file, zaurus is not a member of any group....
\'cat /etc/mtab\' gives me:
/dev/root / jffs2 ro 0 0
/proc /proc proc rw 0 0
/dev/ram1 /dev minix rw 0 0
/dev/mtdblock3 /home jffs2 rw,noatime 0 0
none /dev/shm tmpfs rw 0 0
none /dev/pts devpts rw 0 0
/dev/mmcda1 /usr/mnt.rom/card ext2 rw 0 0
/dev/hda1 /usr/mnt.rom/cf vfat rw,noatime 0 0
...
I\'m confused.
-
Simon is right. You have to add gid and uid options to your /etc/fstab:
/dev/hda1 /mnt/cf auto noauto,owner,gid=ZAURUSGID,uid=ZAURUSUID 0 0
.
For the uid and gid look at /etc/passwd. My zaurus has uid=500 ; gid=500.
(Or just do \'echo $UID\')
jabbath
-
I missed your post, Simon. I\'m sorry. You must have posted while I was composing.... I never looked above my last post.
Thanks, jabbath, for pointing out Simon\'s post and filling in the details to save my reputation of severe laziness!
That worked... my question now is, \"what changed?\" Why did /mnt/cf suddenly and spontaneously start mounting as root? Why wasn\'t /mnt/card affected?
None the less, thanks much to both of you.... I\'m more happy with my Z again.
-
.... or, maybe not...
On boot, the cf card falls back to root.root. I can su to root, umount and remount it, and it comes back as zaurus.qpe.
this is getting old....
-
.... or, maybe not...
On boot, the cf card falls back to root.root. I can su to root, umount and remount it, and it comes back as zaurus.qpe.
this is getting old....
try
su
cd /mnt/cf
chown zaurus:qpe .
-
Or, better yet...
su
chown zaurus:que /mnt/cf/ -R
-
Or maybe try chmod -R a+rw /mnt/cf/