Mounting and changing ownership on affs Amiga Formatted drive does not work?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Siv

Mounting and changing ownership on affs Amiga Formatted drive does not work?

Post by Siv »

Hi,
I want to be able to mount a compact flash card that has been formatted under Amiga OS 2.04 on my Linux Mint 19.3 system.
I believe the correct command would be:

Code: Select all

sudo mount /dev/sdg1 /home/siv/Downloads/dh0 -t affs
This works and I can see the drive appearing in the Files application.
I then want to take ownership and change the mode so that I have read write capability so I run these commands:

Code: Select all

sudo chown siv:siv /home/siv/Downloads/dh0
to take ownership and:

Code: Select all

sudo chmod 777 /home/siv/Downloads/dh0
When I run these commands, they all run with no error but when I look at the drive in Files everything is still read only and the owner is still root/root?

Where am I going wrong?

Siv
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Mounting and changing ownership on affs Amiga Formatted drive does not work?

Post by Moonstone Man »

Siv wrote: Tue May 12, 2020 8:31 pm Where am I going wrong?
I assume that you have created /home/siv/Downloads/dh0 so, unmount the device, chown the mount point then mount the device. Give that a try, and if doesn't work, read the manual.

https://www.kernel.org/doc/Documentatio ... s/affs.txt
Siv

Re: Mounting and changing ownership on affs Amiga Formatted drive does not work?

Post by Siv »

Kadaitcha Man,

Yes I did create the folder first.

Did the umount of both partitions and that worked OK, did the

Code: Select all

sudo chown siv:siv /home/siv/Downloads/dh0
sudo chmod 777 /home/siv/Downloads/dh0
sudo chown siv:siv /home/siv/Downloads/dh1
sudo chmod 777 /home/siv/Downloads/dh1
These both worked with no error messages.
I then re-mounted the two partitions with:

Code: Select all

sudo mount -t affs /dev/sdb1 /home/siv/Downloads/dh0
sudo mount -t affs /dev/sdb2 /home/siv/Downloads/dh1
For some unknown reason when I plugged the device back in it was allocated to /dev/sdb not sdg as previously?
If I then open the two drives in Files all the files and folders show initially with an x on their icons and the owner is listed as root.
If I attempt to open one of the folders I get an authentication request, so I put in my password and then I can open the folder. At that point the small "x" indicators on the files and folders disappear so it looks like I now have read write access but after refreshing, it still shows that the owner is root and the permissions are -rw------ or drwx------ on folders?

Is this a limitation of the affs implementation on Mint in that you can only mount it read only and owned by root?

Siv
Hypex
Level 1
Level 1
Posts: 45
Joined: Mon Apr 03, 2017 9:09 am

Re: Mounting and changing ownership on affs Amiga Formatted drive does not work?

Post by Hypex »

Siv wrote: Wed May 13, 2020 4:59 am For some unknown reason when I plugged the device back in it was allocated to /dev/sdb not sdg as previously?
I find that Linux can reassign devices. It mostly will happen if there is a USB stick in. But older kernels tend to be more random at boot up.

Using label or uuid would be best but FFS doesn't have a uuid. You can work around it by using the device path like so:

Code: Select all

#!/bin/sh 

# affsid.sh <device>

# AFFS ID.
# Print an ID relating to an AFFS volume. Takes device as input.

udevadm info --name ${1} --query symlink | cut -f1 -d' '
Is this a limitation of the affs implementation on Mint in that you can only mount it read only and owned by root?
I was stuck on this recently. Though mode 777 is a taboo and 755 the most recommended I find for normal read/write access that 707 or 777 was needed. Suppose 666 would also be fine if it doesn't look too evil. ;)

I find it still mounts it as root regardless. But the solution is easy. You don't need to stuff around changing file modes and users of your mount point. Simply specify mode in the options. You can give 777 and then have full access. Taking your example:

Code: Select all

sudo mount -t affs -o mode=0777 /dev/sdg1  /home/siv/Downloads/dh0
Locked

Return to “Storage”