6

I've been trying to enable writing from Windows 7 to a samba share mapped to a NTFS-formatted USB Disk for the last 3 hours without any success.

I can access the mount point without any issues from the Ubuntu server itself, but no matter how I mount it I always get "You need permission to perform this action" when attempting to create/modify/delete files/folders from my Windows 7 computer.

I'm now out of ideas, so help is very much appreciated!

Samba configuration:

[global]
server string = serv
netbios name = serv
workgroup = WORKGROUP
wins support = yes

guest account = nobody

security = user
map to guest = bad user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = no
pam password change = no

; lanman auth = yes
ntlm auth = no
lanman auth = no
client ntlmv2 auth = yes

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

load printers = no
printable = no

log file = /var/log/samba/log
log level = 3
max log size = 1024
syslog only = no
syslog = 0

[external]
comment = "External USB Drive"
path = /media/usb0
browseable = Yes
force user = media
force group = media
read only = No
public = yes
guest ok = yes
create mask = 0666
directory mask = 0777
hide dot files = false

Directory permissions:

drwxr-xr-x 11 root  root  4096 Nov 28 17:51 /media/
drwxrwxrwx  2 media media 4096 Nov 28 17:51 /media/usb0/
# (media gid=1001 uid=1001)

Attempted mount options:

sudo mount -t ntfs-3g -o uid=1001,gid=1001 /dev/sdb1 /media/usb0
sudo mount -t ntfs -o uid=1001,gid=1001 /dev/sdb1 /media/usb0
sudo mount -t ntfs -o uid=1001,gid=1001,umask=000 /dev/sdb1 /media/usb0
sudo mount -t ntfs -o uid=1001,gid=1001,umask=000,defaults,users,locale=en_US.UTF-8 /dev/sdb1 /media/usb0
mogelbrod
  • 141

3 Answers3

3

Simply renaming the share to something else seemed to have fixed the issue. Got the idea from this serverfault answer.

mogelbrod
  • 141
0

It might be silly of me to ask, but have you tried the solution given in here ?

I would suggest you to first try to set your

create mask = 0755

and then if it didn't work, try following exactly the same steps.

-1

[2015/12/03 21:49:01.868322, 3] ../source3/smbd/dosmode.c:158(unix_mode) unix_mode(test) returning 0666

[2015/12/03 21:49:01.868789, 2] ../source3/smbd/open.c:972(open_file) media opened file test read=No write=No (numopen=2)

Despite the fact that samba returns default 0666 permissions, the files have no rw access. And since you mentioned that on Linux side is fine try adding this option in the config:

writeable = yes

Default is 'no', which must mean that the share is read only.

This is just a wild guess. Anything can be wrong with these smb shares :-P

koullislp
  • 206
  • 1
  • 7