OESF Portables Forum
General Forums => General Discussion => Topic started by: gdog on August 16, 2004, 02:32:34 pm
-
Can't change ownership and/or permissions of files on my sd card, which is mounted rw (I can write files to it), as root (or zaurus). This is a new one on me. I'm used to being able to do most anything as root ;o)
Any help would be most appreciated!
Thanks,
gdog
-
I'm sure you are using a file system like ext2 and not fat on the SD card so I guess it couldn't be that you are using a file system that doesn't support owner attributes...
-
I have not had the problem, but I have seen a few thread headers that mention it. A search should prove fruitful.
-
I'm sure you are using a file system like ext2 and not fat on the SD card so I guess it couldn't be that you are using a file system that doesn't support owner attributes...
Well I'm glad one of us is sure, lol
Actually I do have it mounted as vfat.... as I was trying to avoid problems later if in fact I wanted to use it as a Windows device. My bad. Guess I better move everything off and remake it.
Thanks for the tip!!!
gdog
-
OK, take care though, there are a few SD cards out there that don't 'take' to being reformatted.
If on the slightest chance you need read only with permissions then you may want to consider making a cramfs image, storing that on the card and mounting that.
Best of luck though.
-
I went ahead and remade the fs, then changed my fstab changes and it worked like a charm. Thanks for the advice and the warnings.
Regards,
gdog
-
Something that is wierd though, is that my CF card is a vfat fs and I can change permissions on the files on it....
-
OK, what you can do and can't do with FAT/VFAT WRT:Ownership and permissions
Owner/Group display is controlled by flags on the mount options and effect the whole mounted volume so regardless of what you chown/chgrp to if you check the file again you will probably find it's still root access. The g (group) and o (other) mask may also be set in the fstab if you really want (see man pages for this).
When you set permissions you can effect the x bit and the w bit, as the attributes entry in fat allows limited storage for rights (including read only) - x is stored in... don't know, probably the 'archive' bit on fat.
Notice though that when you change perms you can only change u+perm and that the g+perm options don't do anything. Notice also that setting u+perm changes g+perm and o+perm. This is becasue fat doesn't provide storage for multiple permission sets and has nothing like an ACL.
Regards,
Andy