Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: SSD Access Issues
#3
In the auto-mount conf file (/etc/udisks-glue.conf) the permissions mask assigned to Fat32 and NTFS drives is 0022 which translates to the permissions and ownership below. 

Code:
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)

This permission block has three parts: Owner:drwx Group:r-x Other:r-x meaning Owner has read/write/execute, Group has Read/Execute and All Other Users also have Read/Execute. Owner = root, Group = root.

This basically means that with the above permissions root access is required to write to the drive. There is no root user defined on moode images for obvious security reasons. To get root access to files one must explicitly prefix local commands with sudo or the connecting sftp client for example FileZilla must do this. 

In a quick test with FileZilla on my Mac there is no option for root access using sftp protocol. It connects using the user id and password you set in the Pi Imager when the image was created.

Here's what can be done providing your drives are formatted as either Fat32 or NTFS. Edit the file /etc/udisks-glue.conf (below) and change dmask and fmask from 0022 to 0000. Reboot and the drives will have the following permissions which provide Read/Write/Execute access for Owner, Group and All Other Users.

Code:
Access: (0777/drwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)

/etc/udisks-glue.conf
Code:
match vfatdisks {
    automount = true
    automount_options = {noexec,nodev,noatime,nodiratime,'dmask=0022','fmask=0022'}
    post_mount_command = '/var/www/util/automount.sh add_mount_udisks "%mount_point"'
    post_unmount_command = '/var/www/util/automount.sh remove_mount_udisks "%mount_point"'
}

match ntfsdisks {
    automount = true
    automount_options = {noexec,nodev,noatime,nodiratime,'dmask=0022','fmask=0022'}
    post_mount_command = '/var/www/util/automount.sh add_mount_udisks "%mount_point"'
    post_unmount_command = '/var/www/util/automount.sh remove_mount_udisks "%mount_point"'
}
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
SSD Access Issues - by Hwrd69 - 09-23-2024, 08:04 PM
RE: SSD Access Issues - by Tim Curtis - 09-23-2024, 08:16 PM
RE: SSD Access Issues - by Tim Curtis - 09-23-2024, 09:24 PM
RE: SSD Access Issues - by TheOldPresbyope - 09-23-2024, 09:27 PM
RE: SSD Access Issues - by Skip Pack - 09-23-2024, 09:34 PM
RE: SSD Access Issues - by Skip Pack - 09-23-2024, 09:40 PM
RE: SSD Access Issues - by Skip Pack - 09-23-2024, 09:46 PM
RE: SSD Access Issues - by Skip Pack - 09-25-2024, 10:34 PM
RE: SSD Access Issues - by Tim Curtis - 09-25-2024, 11:13 PM
RE: SSD Access Issues - by Skip Pack - 09-26-2024, 12:44 AM
RE: SSD Access Issues - by Tim Curtis - 09-26-2024, 10:34 AM
RE: SSD Access Issues - by TheOldPresbyope - 09-26-2024, 12:00 PM
RE: SSD Access Issues - by Hwrd69 - 09-30-2024, 01:01 PM

Forum Jump: