Can't write to mounted usb drive over network (SMB-Share)

Hello Everyone,

i am new to Volumio and have an issue with the maintenance of my Music library!

My Volumio (Version 2.413 on RasPI) runs perfectly fine, except i am not able to write or delete files on the drive my Music is on.
Therefore i am unable to update my library with new songs from my Windows PC over the network
Sidenote: i already copied the files to the drive (NTFS btw.) directly from my Windows PC before connecting it to the RasPI

It is an external USB Drive with one TB capacity (it is the drive sda2)
It (sda2) is mounted properly and i can find it under /media/music, so far so good

Now:
It is owned by “root” and i therefore have no permission to write or delete any files when i try to access the Folder from Windows (smb share)
I tried to “sudo chown” the directory to the user:group volumiovolumio --> operation not permitted (not even as root over local console on the RasPi.
Trying to change it to nobody:nogroup didn’t work as well
Same sad story for trying chmod to 666 as root --> it does not change permissions and no error message…

What can i do?
Anything related to samba (smb.conf)?
Anything relate to how the drive is being mounted?

Many thanks in advance for your help

PS: just in case someone wonders - i did search the forum before posting, but i did not find a solution :frowning: - Sorry guys

Kind regards
Giorgio

NTFS is only read only under Raspbian (on which Volumio is based). You will need to install extra drivers if you want to use this file format (ntfs-3g I think, but Google it to check).

OMG!!!

Many thanks for your quick answer!
I did not know this :open_mouth:

What would be a good file System to Format the drive with?

ext3?
ext4?

Many thx in advance
Giorgio

Hi

it’s me again :smiley:

I just found out, that the latest Version of ntfs-3g is already installed on my RasPI

I googled the instructions how to mount the drive with this Driver:

sudo ntfs-3g /dev/sda1 /mnt/usb

But how do i make permanent?
Is the way via fstab appropriate?

for example something like this: UUID=74EA618724897ACE /media/usb ntfs auto,nofail,sync,users,rw 0 0

or is there a better way to that (e.g. usbmount)?

Thanks in Advance

Kind regards
Giorgio

Hello Again,

I have noticed that i can write to that folder when i am logged in via SSH as user volumio
ntfs 3d is installed

So my conclusion is that is most likely a SAMBA problem…
This my smb.conf file:

global]
netbios name = Volumio
server string = Audiophile Music Player
workgroup = WORKGROUP
security = user
map to guest = Bad User
encrypt passwords = yes
wins support = yes
local master = no
preferred master = no
os level = 30

[Internal Storage]
comment = Volumio Internal Music Folder
path = /data/INTERNAL
read only = no
guest ok = yes

[USB]
comment = Volumio USB Music Folder
path = /mnt/USB
read only = no
guest ok = yes

[NAS]
comment = Volumio NAS Music Folder
path = /mnt/NAS
read only = no
guest ok = yes

any suggestions ?

Thx in advance

Giorgio

OK, good to know. Your drive must already be mounted if Volumio is playing music off it. You could see for yourself by looking at ‘/mnt/USB’ and checking that your music files are there.

Your smb.conf looks fine, as long as your music collection actually is at /mnt/USB.

Can you access the files on the share from windows as user ‘volumio’?

Hi again,

unfortunately it does not work with the user volumio from Windows…

Sigh

Kind regards
Giorgio

1 Like

I’ve dug out a Windows 10 machine (I don’t normally use Windows), and used a usb stick formatted as NTFS. I can add and delete files from Windows 10 without a problem. So, there is something odd going on here :wink:.

So, we know NTFS is ok, you have the stock smb.conf, so Samba should be ok.

On your Windows machine, what exactly does Windows show when you view the USB HDD share on the RPi? What does it show when you try and transfer files?

On your RP,what are the owner and permissions on the files on your USB HDD?

Hi there,

there is indeed something strange going on here! :astonished:

Error msg win (i am german, so it basically says: you need permission to pursue this action
Error-Msg.JPG

this is a screenshot of ls -l of the folder /media:

command line.JPG

as already mentioned the folder is owned by root and i simply cannot Change neither ownership nor permissions :question:

beats me

Kind regards
Giorgio

Your music should be mounted in /mnt/usb automatically. Have you mounted the drive somewhere else manually? The EFI folder doesn’t make much sense on a RPi

Hi chsims1,

Fun fact:

No i did‘t - i have used the stock volumio image from the hompage, put it on the sd-card and fired up my RasPi
And what you saw on the screenshot is what came out :confused:

Greetings
Giorgio

My mistake, it IS actually mounted in /media, but symlinked to /mnt/USB :wink:

So what are the file permissions in your ‘/media/Musik’ folder?

Hi there,

Pls refer to my post from friday with the two screenshots
In the second screenshot you can see the owner (root) and the permissions :wink:

Kind regards

Giorgio

files in the folder not the folder itself :slight_smile:

Also, can you post the result of:

mount | grep sda

please?

Hi chsims1,

sorry, i missunderstood the request :laughing:

Here is the Output of mount | grep sda:

/dev/sda2 on /media/Musik type fuseblk (rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other,blksize=4096,uhelper=udisks)

and here a screenshot of the file permissons:

Music File Permissions.JPG

Thanks for your help! :slight_smile:

Kind Regards
Giorgio

Hi there,

i added an additonal USB stick and took a look how it was mounted:

Media folder with USB Stick.JPG

and did another mount | grep sdb:

mount sdb.JPG

I hope this gives you some more hints

thx

Giorgio

Hi there

I found the reason AND the solution!

First of all: i made a mistake by thinking the external drive is NTFS --> it was not (my bad) :blush:

The drive was formatted as exFAT

I played around with an USB Stick and formatted it with NTFS, then exFAT and found out that only exFat is being mounted for root and no write permissions.

NTFS works just fine but exFAT is read only…

OMG :laughing:

Thanks for all your support

Kind Regards
Giorgio

Well I’m glad you’ve sorted it: I really didn’t understand the mount uid/gid, but exFAT explains that … you definitely need additional drivers for that, BUT simply stick with NTFS and you should be fine :slight_smile:

Hi Giorgio,

Please could you explain how you managed to get this working? I too have a 1 TB USB drive connected to my Raspberry Pi3 running Volumio (latest version). The drive is formatted NTFS. Is there a setting I need to change in the Volumio config to enable write access from my Windows 10 PC?

Many thanks,
Robert.