smb

Win32: API calls to list available network shares on a server?

一世执手 提交于 2019-12-10 10:38:59
问题 Assume I have access to a SMB server at IP 1.2.3.4, how can I determine the list of available shares? Windows Explorer can do it when I enter a UNC path \\1.2.3.4\ - but command prompt "dir \\1.2.3.4\" fails! I've tried the usual FindFirstFile/FindNext calls - which I use successfully to read the files and directories on each share, but they don't work directly on the server root. Ideally, I need something that works for XP onwards. Edit: I want to do this programatically, rather than from

Always permission 777 on mount shared cifs

痴心易碎 提交于 2019-12-10 10:09:01
问题 I have a little problem when I mount a SMB shared folder from a Synology NAS. I want to mount a shared folder with permissions: git:root 700 But the mounted folder always have permission set to 777 ( even after a chmod 700 without error) In my /etc/fstab I used this line: #uid=999 ---> git user //server/folder /mnt/artifacts cifs username=windowsUser,password=xxxxx,gid=0,uid=999,file_mode=0700,dir_mode=0700,iocharset=utf8 0 0 Do you know why I cannot set my rights to 700 ? I did a mistake ?

JCIFS SmbException

浪尽此生 提交于 2019-12-10 02:30:47
问题 I am trying to access a shared folder in my company network via JCIFS. But when i try to list the files under the shared folder, it throws an SmbException as below, jcifs.smb.SmbException: 0xC000009A at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563) at jcifs.smb.SmbTransport.send(SmbTransport.java:663) at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:316) at jcifs.smb.SmbSession.send(SmbSession.java:218) at jcifs.smb.SmbTree.treeConnect(SmbTree.java:176) at jcifs.smb.SmbFile

Mounting SMB network share on desktop

余生颓废 提交于 2019-12-09 21:08:03
问题 I am trying to mount a smb network share onto the desktop via python, I don't want the share to be mounted in a folder, but were all the other mounted shares are (if I use 'connect to Server' in OSX I want my python mount to be mounted in the same location). Here is the current python code: directory = os.path.expanduser('~/Desktop') directory = os.path.normpath(directory) os.system("mount_smbfs //server/servershare " + directory) When I run the above, something strange happens. In finder, my

Windows Server 2016 IIS hosted website failed to load dll on a remote file share on AlibabaCloud

六月ゝ 毕业季﹏ 提交于 2019-12-08 06:46:05
问题 I hit an issue on IIS and it bothers me for many days. After I searched all over the web, I still cannot find the right answer so it is time to post on StackOverflow to seek help. I created a Windows Server 2016 VM on Alibaba Cloud and an SMB file share on Alibaba Cloud. Then I followed this instruction (https://github.com/AlibabaCloudDocs/nas/blob/master/intl.en-US/Best%20Practices/Use%20Windows%20IIS%20and%20NAS%20to%20provide%20Web%20and%20FTP%20services.md) to put my website on the file

Connect to NAS device from Android

时光怂恿深爱的人放手 提交于 2019-12-08 05:35:53
问题 I'd like to add NAS support to one of my application, and it is critical that the application is capable of streaming the content and that it not has to download it to the device. The application will be streaming video content, so once the video is over, there shouldn't be any large video files on the device. What I've tried so far: jCIFS - Works beautifully, but isn't capable of streaming (to my knowledge). I've successfully created video files on the device using jCIFS, but they're still

Performance: Very slow file copying to Windows network using JCIF

佐手、 提交于 2019-12-07 10:20:30
问题 I'm trying to copy a file from my local machine to Shared folder in a windows server. This is the function which I used. public static void copyFileUsingJcifs(final String domain, final String userName, final String password, final String sourcePath, final String destinationPath) throws IOException { final NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(domain, userName, password); final SmbFile sFile = new SmbFile(destinationPath, auth); final SmbFileOutputStream

Linux——定时任务crontab

China☆狼群 提交于 2019-12-06 16:34:34
linux内置的cron进程能帮我们实现这些需求,cron搭配shell脚本,非常复杂的指令也没有问题。 cron介绍 我们经常使用的是crontab命令是cron table的简写,它是cron的配置文件,也可以叫它作业列表,我们可以在以下文件夹内找到相关配置文件。 /var/spool/cron/ 目录下存放的是每个用户包括root的crontab任务,每个任务以创建者的名字命名 /etc/crontab 这个文件负责调度各种管理和维护任务。 /etc/cron.d/ 这个目录用来存放任何要执行的crontab文件或脚本。 我们还可以把脚本放在/etc/cron.hourly、/etc/cron.daily、/etc/cron.weekly、/etc/cron.monthly目录中,让它每小时/天/星期、月执行一次。 crontab的使用 crontab [-u username]    //省略用户表表示操作当前用户的crontab -e (编辑工作表) -l (列出工作表里的命令) -r (删除工作作) 我们用 crontab -e 进入当前用户的工作表编辑,是常见的vim界面。每行是一条命令。 crontab的命令构成为 时间+动作,其时间有 分、时、日、月、周 五种,操作符有 * 取值范围内的所有数字 / 每过多少个数字 - 从X到Z , 散列数字 实例 实例1

Mounting Azure File Storage in Docker container via Kubernetes

≯℡__Kan透↙ 提交于 2019-12-06 14:16:35
I am attempting to mount my Azure File Storage to a container using the method found here: https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/azure_file Upon pod creation I am getting the error: "Output: mount error: could not resolve address for [encoded name of my file storage].file.core.windows.net: Unknown error" I have confirmed that my File Storage resource and the VM hosting the pod are in the same Azure location (East US). I am able to mount this share manually on the VM hosting the pod using the same address in the error above. Is it possible I am missing some sort

CTDB Samba failover not highly available

大城市里の小女人 提交于 2019-12-06 12:21:36
问题 My Setup 3 nodes running ceph + cephfs 2 of these nodes running CTDB & Samba 1 client (not one of the 3 servers) It is a Lab setup, so only one nic per server=node, one subnet as well as all Ceph components plus Samba on the same servers. I'm aware, that this is not the way to go. The problem I want to host a clustered Samba file share on top of Ceph with ctdb. I followed the CTDB documentation (https://wiki.samba.org/index.php/CTDB_and_Clustered_Samba#Configuring_Clusters_with_CTDB) and