Write access on attached USB drives

Raspberry Pi related support

Write access on attached USB drives

Postby Trollpferd » 29 Sep 2015, 15:54

Hi all,

first of all: thank you for your work in RuneAudio. So far, for me, this is the best Player I have seen - and I really tried a lot.
I was wondering how I am able to access my Raspberry Pi 2, or, to be more precisely, the harddisk attached via one of the USB ports.
So far, from my Windows Network, I do only have read access to the hard disk.
Would be great to have write access as well in order to update my music folders via the network.
Perhaps this is an easy Linux thing - but I am not used to Linux at all ...

Thank you for any hint ...

Kind regards, Trollpferd
Trollpferd
 
Posts: 5
Joined: 29 Sep 2015, 15:45

Re: Write access on attached USB drives

Postby hondagx35 » 29 Sep 2015, 16:58

Hi Trollpferd,

Would be great to have write access as well in order to update my music folders via the network.

On my PI2 this is working without problems.
Two things have to be considered:
- dev mode has to be turned on (x.x.x.x/dev)
- the default mount options for your filesystem should be rw and not ro.

If your disk is vfat or exfat, then you have to change the setting in /etc/udevil/udevil.conf
# default_options specifies what options are always included when performing
# a mount, in addition to any options the user may specify.
# Note: When a device is present in /etc/fstab, and the user does not specify
# a mount point, the device is mounted with normal user permissions using
# the fstab entry, without these options.
# default_options_FSTYPE, if present, is used to override default_options
# when mounting a specific fstype (eg ext2, nfs).
# The variables $USER, $UID, and $GID are changed to the user's username, UID,
# and GID.
# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
# WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.
default_options = nosuid, noexec, nodev, noatime
default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro
# mount iso9660 with 'ro' to prevent mount read-only warning
default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_vfat = ro, iocharset=utf8, noatime, uid=$UID, gid=$GID
default_options_exfat = ro, nonempty, uid=$UID, gid=$GID
default_options_hfsplus = ro, uid=$UID, gid=$GID
default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
default_options_ntfs = nosuid, noexec, nodev, noatime, fmask=0133, uid=$UID, gid=$GID, utf8
default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID
default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID


For ntfs nothing has to be done.

The drive is accessible via:
\\192.168.0.23\music_store\USB\SAMSUNG in my case.

- music_store is the samba name
- samba configuration is in /etc/samba/smb.conf which is a symlink to either /etc/samba/smb-dev.conf or /etc/samba/smb-prod.conf

Frank
User avatar
hondagx35
 
Posts: 3039
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Write access on attached USB drives

Postby Trollpferd » 01 Oct 2015, 21:42

Hi Frank,

many thanks for this cmprehensive answer! Indeed the reason was the FAT32 formatting of the HD. Now, with NTFS I am able to update the HD contents.
What I haven't understood: "dev mode has to be turned on (x.x.x.x/dev)"
Where is this folder "dev"? I can't see a folder with this name within my Pi folders.
And, by standard, on a freshly installed SD card, is this dev(elovers') mode by default switched to "on" or to "off"?

Another question: Is there an easy way to exclude others in my network to update the Music Folders?
I'd like to hinder others from accidental changes (e.g. via the Windows Explorer's Drag'n'Drop).

Finally: on a Windows System, which Software would you recommend to edit .conf files (e.g. Notepad doesn't Show the line breaks)?

Thanks again, Trollpferd
Trollpferd
 
Posts: 5
Joined: 29 Sep 2015, 15:45

Re: Write access on attached USB drives

Postby hondagx35 » 02 Oct 2015, 10:45

Hi Trollpferd,

Where is this folder "dev"? I can't see a folder with this name within my Pi folders.

This is a page on the user interface (browser), it is accessible via http://your_PI_ip_address/dev (e.g. http://192.168.0.14/dev).

And, by standard, on a freshly installed SD card, is this dev(elovers') mode by default switched to "on" or to "off"?

This depends on the image you are using.

Finally: on a Windows System, which Software would you recommend to edit .conf files

I use WinSCP to browse and notepad++ to edit the files.

Frank
User avatar
hondagx35
 
Posts: 3039
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Write access on attached USB drives

Postby thedman! » 19 Apr 2016, 10:15

It might just be my computer, but it might help someone else in the future... but for the second time just doing the below hasn't worked for me. I've needed to make the changes below THEN FTP to the USB stick, change something, and then my mac recognises the permissions have changed and allows me to transfer audio on to the USB stick using Mac's Finder.

hondagx35 wrote:- dev mode has to be turned on (x.x.x.x/dev)
- the default mount options for your filesystem should be rw and not ro.

If your disk is vfat or exfat, then you have to change the setting in /etc/udevil/udevil.conf
# default_options specifies what options are always included when performing
# a mount, in addition to any options the user may specify.
# Note: When a device is present in /etc/fstab, and the user does not specify
# a mount point, the device is mounted with normal user permissions using
# the fstab entry, without these options.
# default_options_FSTYPE, if present, is used to override default_options
# when mounting a specific fstype (eg ext2, nfs).
# The variables $USER, $UID, and $GID are changed to the user's username, UID,
# and GID.
# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
# WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.
default_options = nosuid, noexec, nodev, noatime
default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro
# mount iso9660 with 'ro' to prevent mount read-only warning
default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_vfat = ro, iocharset=utf8, noatime, uid=$UID, gid=$GID
default_options_exfat = ro, nonempty, uid=$UID, gid=$GID
default_options_hfsplus = ro, uid=$UID, gid=$GID
default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
default_options_ntfs = nosuid, noexec, nodev, noatime, fmask=0133, uid=$UID, gid=$GID, utf8
default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID
default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID


thedman!
 
Posts: 62
Joined: 24 Mar 2016, 15:45

Re: Write access on attached USB drives

Postby djpyle » 01 Jan 2018, 11:09

thedman! wrote:It might just be my computer, but it might help someone else in the future... but for the second time just doing the below hasn't worked for me. I've needed to make the changes below THEN FTP to the USB stick, change something, and then my mac recognises the permissions have changed and allows me to transfer audio on to the USB stick using Mac's Finder.


Thank you! FTPing into the Pi and making a change fixed the problem for me as well. Finder suddenly lets me in. I thought I was going crazy!
djpyle
 
Posts: 3
Joined: 24 Nov 2015, 23:10

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: cmh714 and 7 guests