Writing to a EXT2 partition


superatarian

Member
Joined
Jun 20, 2009
Messages
284
Hello. I used G-Parted to format a ext2 partition to be used on my Atari Firebee. I wanted to un-tar some files, because the Firebee still has some bugs and crashes when un-taring files with a lot of folders. I figured it should be no problem for the Pandora (or the Pyra when it comes out). However when I want to drag the tar files to the ext2 partition nothing happens. I see the permission is read/write for root, but only read for other.

So how to do I change the permission to read/write for other so I can write to this partition? How would I do it until root?
I have done much with root so it is a little cloudy. I imagine I have it written down some where, but I thought this would be faster.
 
Hmm, that's odd; when my Pandora mounts vfat partitions, they're owned by root but have full rwx permissions, but with ext partitions it mounts them as mode 711 (owner rwx, all others r only). I don't remember having to do anything fancy to create the folders in this, and they're all owned by my local user, which makes me suspect it used to be mounted so I could write to it with my user. It's not a problem now as now it contains folders owned by me, so I can do what I want with those.

So I'd recommend you set up similar, to avoid future problems, assuming that won't cause problems with your firebee. From a terminal, 'sudo mkdir' a folder in the root, then 'sudo chown <user> <user>' it (it'll prompt you for your login password when using sudo for the first time, and periodically after that, so I hope you know that). Then you should be able to untar files into that folder with no problems.
 
when my Pandora mounts vfat partitions, they're owned by root but have full rwx permissions
FAT32 does not support any kind of sophisticated rights management, neither rwx nor any kind of owner exist for a file or directory. Those are the default fallback values.

but with ext partitions it mounts them as mode 711 (owner rwx, all others r only).
The root directory by itself has permissions and ownership as well, which defaults to such values for obvious reasons. Just use chown/chmod etc on its mountpoint.
 
It is so strange because when I stick the CF into the Atari Firebee, I can write to it freely. Must be the OS. Is there a way to use the whole desktop as root? I will try what levi suggested.
[doublepost=1501337906,1501334074][/doublepost]I guess I could do everything in the Root terminal. I could move the tar files into it and then un-tar them. It would be slower, but it could be done.
 
Yes, or you can 'tar -xf' with the path to the tar file after having cd'ed to the right target directory, and they'll be unzipped into there. Then it should be reading off one device and writing to another, which should be quicker.

I guess the Atari OS doesn't have the same fine grained permissions being largely a single user system (and the Pandora inherits those despite generally being single user too), so provided the card isn't physically locked, it'll be all writable.
 
Ok. I was able to sign on as root by using the sudo su command and then entering my password. I was able to copy a TAR file to the EXT2 partition, which is great. However, when I tried to remove the file, I kept getting "permission denied".
Anyone know why this is and how I can fix it? Also, when I tried to rename the TAR file, I got the same thing. Any ideas anyone?
 
When you copy the file to ext2 (which is unnecessary as I wrote above) it'll end up being owned by root, so you'll need to delete is as root also. sudo rm should work.
 
The following command should make a file readable and writable by everyone:

chmod 666 filename

That means you can also delete the file.
 
I emailed Evil Dragon. He says it is a permission issue and how I mounted the CF. He says all I have to do is to change the way I mount the partition. I understand that, but where in the settings area is the place where I can change it?
[doublepost=1501933939,1501933891][/doublepost]
Yes, but you'll need owner access to be able to chmod it, which means doing it under sudo.
Thanks.. I will try this......
[doublepost=1501940085][/doublepost]Well I found something that worked. I used the commands below and now I have full access. These commands are under "su" of course.

chgrp -R groupname /mnt/shared
chown -R username /mnt/shared
chmod -R a+w /mnt/shared
 
Like I said, chown it :)

You were correct. I have never really used these commands before, so thanks for telling me and getting it through my thick head. I have noticed that is is not permanent. Need to
re-enter the commands after a re-boot, but that is fine with me.
 
Back
Top