You are not logged in.

#1 2013-06-08 07:38:31

permitivity
Member
Registered: 2013-02-18
Posts: 11

Samba - unable to write to shared drive

Hi,
I tried some of the suggestions on how to fix write access to USB drives using Samba, but nothing worked for me.

I'm using udev to auto-mount flash drives (NTFS format) on a pogoplug.  I'm using Samba to access the flash drive from a windows machine (win 7).  I'm able to open files in the shared drive, but not able to write to the shared drive.

I thought I had all the samba.conf details on making it writable.  And maybe the problem is that the drive isn't mounted with the correct permissions?  What ever the cause, when I go to the shared directory, I get this error when trying to delete files from it: 

"You need permission to perform this action", and "You require permission from ALARM/root to make changes to this file".

I get this same error if I try to make a new folder in the shared folder.

Here's my samba.conf:

[global]
    log file = /var/log/samba/%m.log
    dns proxy = no
    load printers = yes
    writeable = yes
    server string = Samba Server
    path = /media
    workgroup = MYGROUP
    printcap name = /etc/printcap
    public = yes
    security = share
    max log size = 50
    guest account = root

[share]
;note:  I've also tried to name this [public], but same result, not able to write to stuff in /media.
path = /media
public = yes
;only guest = yes
writable = yes
printable = no
guest ok = yes
;create mask = 0777


And here's my udev rule:

# Global mount options
ACTION=="add", ENV{mount_options}="noatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

Just in case it matters, I did perform "pdbedit -a -u root" to add root to samba user list.

Offline

#2 2013-06-08 10:35:02

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Samba - unable to write to shared drive

As far as i know security=share is deprecated in samba 4.

Offline

#3 2013-06-08 11:05:42

Minsc
Member
Registered: 2012-07-16
Posts: 95

Re: Samba - unable to write to shared drive

You should probably remove guest account = root and also use security = user in samba.conf

Offline

Board footer

Powered by FluxBB