VHD mounting from CIFS Share

Status
Not open for further replies.

Snufkin

Dabbler
Joined
Nov 15, 2014
Messages
25
Hello,

I have setup CIFS to allow anyone to access the shares. This works without issues, except for this problem : When I try to mount a VHD file on a Windows computer it comes up with this error : "Incorrect Function"

Any idea how I can fix this ?

I can create a VHD on the share from the Windows computer , but cannot mount it. If I copy the file to the windows computer's C drive I can mount it.

I'm running FreeNAS 9.10
 

Snufkin

Dabbler
Joined
Nov 15, 2014
Messages
25
Have also tried setting the max protocol level to SMB 2_02 but this did not work :(
 

Snufkin

Dabbler
Joined
Nov 15, 2014
Messages
25
Also .... smbstatus reports my shares as RDONLY .... but I can create folders / delete files. Is there somewhere to set share permissions ? Are they separate as in Windows ? (Example : NTFS file permissions / Windows Share Permissions )

Please have a look at the attached image. Please help....
 

Attachments

  • Selection_109.jpg
    Selection_109.jpg
    54.8 KB · Views: 323

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Also .... smbstatus reports my shares as RDONLY .... but I can create folders / delete files. Is there somewhere to set share permissions ? Are they separate as in Windows ? (Example : NTFS file permissions / Windows Share Permissions )

Please have a look at the attached image. Please help....
Post contents of /usr/local/etc/smb4.conf
 

Snufkin

Dabbler
Joined
Nov 15, 2014
Messages
25
Here goes :

[global]
server max protocol = SMB3
interfaces = 127.0.0.1 192.168.10.222
bind interfaces only = yes
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 411050
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = Crewtech NAS server
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
null passwords = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = no
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = CT-NAS
workgroup = CREWTECH
security = user
pid directory = /var/run/samba
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1


[MainStore]
path = /mnt/MediaPool/MainStore
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare


[apps]
path = /mnt/MediaPool/MainStore/Apps
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare


[backup]
path = /mnt/MediaPool/MainStore/Backup
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare


[iso]
path = /mnt/MediaPool/MainStore/ISO
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare


[vhd]
path = /mnt/MediaPool/MainStore/VHD
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
hide dot files = yes
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
 

Snufkin

Dabbler
Joined
Nov 15, 2014
Messages
25
Does anyone know how to fix this? I need people to access the shares without logging in and they must have read write access and be able to mount VHD files.
 

chow

Cadet
Joined
May 12, 2016
Messages
1
I was having an issue with FreeNAS/CIFS-Samba and backups (incorrect function) or VHD(x) creation (incorrect function). The issue was solved by changing max server protocol to SMB 3_00. I had read several places, including the freenas bug reports webiste, that reverting from SMB 3 to SMB 3_02 would solve the problem as that's what 2012R2 and win8.x use. This seems to not be the case. Hopefully google crawls this thread soon.

Errors applicable for windows 8.x and 2012 R2 backups:

Error in Backup 0x807800C5 Incorrect function

The backup operation that started at '' has failed with following error code '0x807800C5' (There was a failure in preparing the backup image of one of the volumes in the backup set.). Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.


Thanks Anodos, for your suggestion above!!
 

Snufkin

Dabbler
Joined
Nov 15, 2014
Messages
25
I'm still having this issue. I get "incorrect function" or "request is not supported" depending on which max smb server version I set it to. Any other way of fixing this ?
 
Status
Not open for further replies.
Top