Moode Forum
Enabling write access to external HDD (in: /media/SYSTEM)? - Printable Version

+- Moode Forum (http://moodeaudio.org/forum)
+-- Forum: moOde audio player (http://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (http://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: Enabling write access to external HDD (in: /media/SYSTEM)? (/showthread.php?tid=828)

Pages: 1 2 3 4


Enabling write access to external HDD (in: /media/SYSTEM)? - wmoecke - 12-24-2018

Hello,

I cannot for the life of me, figure out why my external hard drive is not allowing me (or any user, other than root) direct write access via its mount point (/media/SYSTEM).
I know that I am allowed to write to it over Windows via the samba share - that is fine, but for what I mean to do now, is not enough.

Explanation: I've installed Transmission to be able to download music directly into my HDD (via its own web interface). But that isn't working, because the /media/SYSTEM mount point is owned solely by the root user and I cannot change anything (even with sudo). So I've created a new folder in /mnt for downloading content, which is fine as far as Transmission goes. But then again, can't move that content to the external disk because of permission issues.

E.g., trying to change permissions to that directory:
pi@moode:~ $ sudo chown pi:pi * /media/SYSTEM
chown: changing ownership of '/media/SYSTEM': Operation not permitted

Then:
pi@moode:~ $ sudo su
root@moode:/home/pi# chown pi:pi * /media/SYSTEM
chown: changing ownership of '/media/SYSTEM': Operation not permitted
(No avail.)

root@moode:/home/pi# chmod -R 757 /media/SYSTEM
(Still nothing.)

How can I go about achieving that? i.e.: Can I enable the /media/SYSTEM mount point at boot to be more flexible (ideally)? If so, how? If not, then how can I go around that issue?

I'm not a total noob, but admit that I feel powerless when facing these silly *nix permission issues. Really frustrating not having access to my own stuff inside moOde.
BTW, I'm posting a short video of the moOde unit that I've built, featuring a custom 20x4 LCD display, LIRC control, TTS (all installed & programmed by myself) and even a nifty (and somewhat dodgy) spectrum analyser:
https://photos.app.goo.gl/fQ6JSW4qQ7Da3LQh6

Wishing all a Happy Christmas.


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - Tim Curtis - 12-25-2018

Hi,

Really great DIY :-)

What format is the file system on your HDD?

I use fat32 (VFAT) or exFat and no issues writing data to /media/...

-Tim


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - wmoecke - 12-25-2018

(12-25-2018, 04:03 AM)Tim Curtis Wrote: Hi,

Really great DIY :-)

What format is the file system on your HDD?

I use fat32 (VFAT) or exFat and no issues writing data to /media/...

-Tim

Sorry Tim. Forgot to tell you the basics: my HDD is also vfat.
pi@moode:~ $ mount | grep sda

/dev/sda1 on /media/SYSTEM type vfat (rw,nosuid,nodev,noexec,noatime,nodiratime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,errors=remount-ro,uhelper=udisks)

Your reply indicates something odd must be going on with my system. Btw, I'm not running the most up-to-date version of moOde:
Linux kernel 4.14.52-v7+ running on armv7l architecture

                          ____     __
              __ _  ___  / __ \___/ /__
             /  ' \/ _ \/ /_/ / _  / -_)
            /_/_/_/\___/\____/\_,_/\__/

                 moOde audio player
                © 2014 Tim Curtis
(Reason being, I'm too touchy about my current setup to jeopardize all my custom code and settings by loading a brand new OS upgrade on it).

Many cheerful thanks for your compliment on my box; please let me know if there's something else you'd like me to check for you.

Btw, here's a quick rundown on my unit's shutdown and startup sequences in full glory (for your Christmas enjoyment):
(Shutdown): https://photos.app.goo.gl/mWVxDjKYzNHCLi8H6
(Startup): https://photos.app.goo.gl/Juj6sYKyMTJKuktf7

(don't mind the incorrect song info displayed - this particular web station seems to be adept of "lazy loading" its song metadata updates. Not an issue on my box or moOde.)

Happy X-mas!


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - Tim Curtis - 12-25-2018

Love the videos :-)

You might want to consider making a new build on a separate SDCard using latest moOde release and then add in and test your customizations.

-Tim


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - remy1961 - 12-25-2018

(12-24-2018, 06:31 PM)wmoecke Wrote: BTW, I'm posting a short video of the moOde unit that I've built, featuring a custom 20x4 LCD display, LIRC control, TTS (all installed & programmed by myself) and even a nifty (and somewhat dodgy) spectrum analyser:
https://photos.app.goo.gl/fQ6JSW4qQ7Da3LQh6

Wishing all a Happy Christmas.

Hi. That's a real DIY. I can imagine you enjoying listening to your music and watching your creation with a smile. How does the TTS work? Merry Christmas!
Remy


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - wmoecke - 12-25-2018

(12-25-2018, 07:10 PM)remy1961 Wrote:
(12-24-2018, 06:31 PM)wmoecke Wrote: BTW, I'm posting a short video of the moOde unit that I've built, featuring a custom 20x4 LCD display, LIRC control, TTS (all installed & programmed by myself) and even a nifty (and somewhat dodgy) spectrum analyser:
https://photos.app.goo.gl/fQ6JSW4qQ7Da3LQh6

Wishing all a Happy Christmas.

Hi. That's a real DIY. I can imagine you enjoying listening to your music and watching your creation with a smile. How does the TTS work? Merry Christmas!
Remy

How about this: https://photos.app.goo.gl/Zz2JkmHmxXUMWron8
(hope you can hear it loud enough, phone mic is pointing away from my main speakers - TTS comes out from them too).

I giggle every time she speaks. Can't help.


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - wmoecke - 12-25-2018

### UPDATE ###

I managed to work around this issue by creating a new SMB share that points to my 'Downloads' directory (in /mnt/DISK - editing the /etc/samba/smb.conf did the trick). So at least I can now move things from the folder Transmission uses to download stuff to the HDD manually on my Windows desktop explorer.

It's not what I had in mind, but for practical purposes it works. Until someone sheds some light into the issue...

BTW, I think it might be relevant to mention that this HDD suffered a few times from some unexpected power-downs (power outages while unit was working), so every time such a thing happened I tried fixing it by issuing the fsck command:
pi@moode:~ $ sudo su

root@moode:/home/pi# fsck -t vfat /dev/sda1
fsck from util-linux 2.29.2
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
malloc:Cannot allocate memory

Then again:
root@moode:/home/pi# fsck -t vfat /dev/sda1
fsck from util-linux 2.29.2
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
malloc:Cannot allocate memory

And as you can see, it seems impossible to fix the FS issues. I wonder if anyone had worked around this in moOde.


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - wmoecke - 12-25-2018

(12-25-2018, 07:10 PM)remy1961 Wrote:
(12-24-2018, 06:31 PM)wmoecke Wrote: BTW, I'm posting a short video of the moOde unit that I've built, featuring a custom 20x4 LCD display, LIRC control, TTS (all installed & programmed by myself) and even a nifty (and somewhat dodgy) spectrum analyser:
https://photos.app.goo.gl/fQ6JSW4qQ7Da3LQh6

Wishing all a Happy Christmas.

Hi. That's a real DIY. I can imagine you enjoying listening to your music and watching your creation with a smile. How does the TTS work? Merry Christmas!
Remy

Another quick footage, this time playing back some stuff freshly downloaded by Transmission (after I finally managed to move over to the HDD via Windows Explorer): https://photos.app.goo.gl/HdppL9czbaJT7GxS7


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - wmoecke - 12-25-2018

(12-25-2018, 06:51 PM)Tim Curtis Wrote: Love the videos :-)

You might want to consider making a new build on a separate SDCard using latest moOde release and then add in and test your customizations.

-Tim

Hi Tim, definately something I wanna do, as soon as I get my hands on a brand new 8GB SDCard (on its way).  ;-)
(It's gonna be a ton of work, but worth checking Tim's newest effort).


RE: Enabling write access to external HDD (in: /media/SYSTEM)? - Tim Curtis - 12-25-2018

(12-25-2018, 07:49 PM)wmoecke Wrote: ### UPDATE ###

I managed to work around this issue by creating a new SMB share that points to my 'Downloads' directory (in /mnt/DISK - editing the /etc/samba/smb.conf did the trick). So at least I can now move things from the folder Transmission uses to download stuff to the HDD manually on my Windows desktop explorer.

It's not what I had in mind, but for practical purposes it works. Until someone sheds some light into the issue...

BTW, I think it might be relevant to mention that this HDD suffered a few times from some unexpected power-downs (power outages while unit was working), so every time such a thing happened I tried fixing it by issuing the fsck command:
pi@moode:~ $ sudo su

root@moode:/home/pi# fsck -t vfat /dev/sda1
fsck from util-linux 2.29.2
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
malloc:Cannot allocate memory

Then again:
root@moode:/home/pi# fsck -t vfat /dev/sda1
fsck from util-linux 2.29.2
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
malloc:Cannot allocate memory

And as you can see, it seems impossible to fix the FS issues. I wonder if anyone had worked around this in moOde.

Try running the cmd with sudo.