Thank you for your donation!


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


Problem: Enabling network Write to drives that are locally attached to the Pi
#1
Just thought I'd throw this into the ring again.

Asked the following Q on a Windows forum:

Using Win11 Pro I have some networked SSD drives.....which function as 'read only'. Drives attached to Raspberry Pi 4 (running Moodeaudio)....and SMB is ON...all good on the Pi. The drives themselves are not write protected, nor do they have any kind of switch. They connect to the Pi via usb
Attempting to write/edit in Win11 returns "The disk is write protected. Remove write protection, or use another disk" Attempting to change 'properties' of drives results in same response. How do I remove write protection please???

This answer came back:

It's not "write protection" per se, it's a matter of permissions and those you have to change in the server (RPi), not at the client (Windows 11)

Is this correct....I'm hoping so.
Is there anything that can be done to change relevant permissions on the Pi....so that writing from a networked Win11 PC can be enabled?
Or am I still barking up the wrong tree....?
Reply
#2
In Win11 how did you connect to the drives on the Pi?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(02-05-2024, 10:27 PM)Tim Curtis Wrote: In Win11 how did you connect to the drives on the Pi?

I mapped them as network drives in This PC view.
Reply
#4
Here's the help for the SMB server in moOde

Server Message Block (SMB) allows files to be shared over a network with Windows, Mac and Linux clients.
Shares: NAS, SDCard, Playlists and USB shares are automatically created.
Access: Specify "anonymous" access or userid = guest and no password when mounting shares.

When you mapped the drives did you specify a particular userid and password?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(02-06-2024, 12:20 PM)Tim Curtis Wrote: Here's the help for the SMB server in moOde

Server Message Block (SMB) allows files to be shared over a network with Windows, Mac and Linux clients.
Shares: NAS, SDCard, Playlists and USB shares are automatically created.
Access: Specify "anonymous" access or userid = guest and no password when mounting shares.

When you mapped the drives did you specify a particular userid and password?

Initially used pi/moodeaudio.....then tried user/moodeaudio.
I've got pi/moodeaudio on my Pi
Reply
#6
(02-06-2024, 12:41 PM)Tonewheelkev Wrote:
(02-06-2024, 12:20 PM)Tim Curtis Wrote: Here's the help for the SMB server in moOde

Server Message Block (SMB) allows files to be shared over a network with Windows, Mac and Linux clients.
Shares: NAS, SDCard, Playlists and USB shares are automatically created.
Access: Specify "anonymous" access or userid = guest and no password when mounting shares.

When you mapped the drives did you specify a particular userid and password?

Initially used pi/moodeaudio.....then tried user/moodeaudio.
I've got pi/moodeaudio on my Pi

Per the help try userid = guest and no password

You might also have to look at and possibly change the permissions on the USB disks/files using the command line so that the directories and files are owned by root and have read and execute permissions.

Here's what one of my USB drives looks like.

Code:
pi@trx:~ $ ls -l /media/VFAT128/
total 32
drwxr-xr-x 193 root root 32768 Dec 16 16:57 FLAC

pi@trx:~ $ ls -l /media/VFAT128/FLAC/
total 6112
drwxr-xr-x  3 root root 32768 Jan  8  2021 'Aaron Goldberg'
drwxr-xr-x  3 root root 32768 Jan  8  2021 'Abdullah Ibrahim'
.
.

pi@trx:~ $ ls -l /media/VFAT128/FLAC/Abdullah\ Ibrahim/Cape\ Town\ Flowers/
total 213760
-rw-r--r-- 1 root root 14289601 Jan  8  2021 '01 Excursions.flac'
-rw-r--r-- 1 root root 17615416 Jan  8  2021 '02 Eleventh Hour.flac'
-rw-r--r-- 1 root root 13733850 Jan  8  2021 '03 Kofifi Blue.flac'
-rw-r--r-- 1 root root 18044608 Jan  8  2021 '04 Chisa.flac'
-rw-r--r-- 1 root root 14091541 Jan  8  2021 '05 Song For Aggerey.flac'
-rw-r--r-- 1 root root 13806830 Jan  8  2021 '06 The Stride.flac'
-rw-r--r-- 1 root root 17171357 Jan  8  2021 '07 The Call.flac'
-rw-r--r-- 1 root root 28563123 Jan  8  2021 '08 African Marketplace.flac'
-rw-r--r-- 1 root root 35820994 Jan  8  2021 '09 Joan - Cape Town Flower.flac'
-rw-r--r-- 1 root root 17293511 Jan  8  2021 '10 Maraba Blue.flac'
-rw-r--r-- 1 root root 28242975 Jan  8  2021 '11 Monk In Harlem.flac'
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
It's devilishly annoying to try to repro this problem when Win10/Win11 so tenaciously hold on to credentials for shares previously mounted.

Nevertheless, with both Win10 Pro/Win11 Pro (which I run in Linux as guest OSes on Oracle VirtualBox), I can successfully map a previously known moOde SMB share (known as a "network share" in Windows parlance) choosing "Connect using different credentials:" and then entering User name "guest", leaving the Password blank, and clicking "Ok".

This is true whether I am sharing the SDCARD, Playlists, USB thumbdrives (filesystem formatted FAT32) or a SSD m.2 module (filesystem formatted EXT4) connected via USB.

Don't know what else to say.

Regards,
Kent
Reply
#8
(02-06-2024, 01:22 PM)Tim Curtis Wrote:
(02-06-2024, 12:41 PM)Tonewheelkev Wrote:
(02-06-2024, 12:20 PM)Tim Curtis Wrote: Here's the help for the SMB server in moOde

Server Message Block (SMB) allows files to be shared over a network with Windows, Mac and Linux clients.
Shares: NAS, SDCard, Playlists and USB shares are automatically created.
Access: Specify "anonymous" access or userid = guest and no password when mounting shares.

When you mapped the drives did you specify a particular userid and password?

Initially used pi/moodeaudio.....then tried user/moodeaudio.
I've got pi/moodeaudio on my Pi

Per the help try userid = guest and no password

You might also have to look at and possibly change the permissions on the USB disks/files using the command line so that the directories and files are owned by root and have read and execute permissions.

Here's what one of my USB drives looks like.

Code:
pi@trx:~ $ ls -l /media/VFAT128/
total 32
drwxr-xr-x 193 root root 32768 Dec 16 16:57 FLAC

pi@trx:~ $ ls -l /media/VFAT128/FLAC/
total 6112
drwxr-xr-x  3 root root 32768 Jan  8  2021 'Aaron Goldberg'
drwxr-xr-x  3 root root 32768 Jan  8  2021 'Abdullah Ibrahim'
.
.

pi@trx:~ $ ls -l /media/VFAT128/FLAC/Abdullah\ Ibrahim/Cape\ Town\ Flowers/
total 213760
-rw-r--r-- 1 root root 14289601 Jan  8  2021 '01 Excursions.flac'
-rw-r--r-- 1 root root 17615416 Jan  8  2021 '02 Eleventh Hour.flac'
-rw-r--r-- 1 root root 13733850 Jan  8  2021 '03 Kofifi Blue.flac'
-rw-r--r-- 1 root root 18044608 Jan  8  2021 '04 Chisa.flac'
-rw-r--r-- 1 root root 14091541 Jan  8  2021 '05 Song For Aggerey.flac'
-rw-r--r-- 1 root root 13806830 Jan  8  2021 '06 The Stride.flac'
-rw-r--r-- 1 root root 17171357 Jan  8  2021 '07 The Call.flac'
-rw-r--r-- 1 root root 28563123 Jan  8  2021 '08 African Marketplace.flac'
-rw-r--r-- 1 root root 35820994 Jan  8  2021 '09 Joan - Cape Town Flower.flac'
-rw-r--r-- 1 root root 17293511 Jan  8  2021 '10 Maraba Blue.flac'
-rw-r--r-- 1 root root 28242975 Jan  8  2021 '11 Monk In Harlem.flac'
Using Guest/<Blank> as Network credentials seemed to make no difference.

After much trial and error in Moode SSH.....found only instance of:
Code:
drwxr-xr-x  3 root root


....these are the permissions?? All look like this.....with exception of


Code:
pi@trx:~ $ ls -l /media/VFAT128/FLAC/Abdullah\ Ibrahim/Cape\ Town\ Flowers/
total 213760
-rw-r--r-- 1 root root 14289601 Jan  8  2021 '01 Excursions.flac'
-rw-r--r-- 1 root root 17615416 Jan  8  2021 '02 Eleventh Hour.flac'

Played with this for some time.....can't get to -rw-r--r-- 1 root root etc with my files
Lost here!
Reply


Forum Jump: