I'm trying to connect from windows to Samba Shared folder on linux using php |
i found solution for connection using this code
$sharename = '\\LinuxIPAddressShared_folder';
$username = 'username';
$password = 'password';
$letter = 'Z:';
if (!is_dir($letter . "/TMP")) {
$WshNetwork = new COM("WScript.Network");
$WshNetwork->MapNetworkDrive($letter, $sharename, FALSE, $username,
$password);
}
and is working perfect
|
Unable to access Samba folder from Windows (Using Raspberry Pi XMBC as a Samba Server) |
That may depend on the directory and file rights. If the us who runs smb
have no access rights, you can't read or write files. You can find out file
permissions with ls -la you will also see owner and owner group.
You can try to set read and write permissions for all (chmod 777 directory
-R). If this was the problem, then you should give read and write
permissions only to the user that runs smb. Set permissions for all back to
0 (770) because of security reasons.
Here you find a tutorial on set up samba for Rasapberry Pi.
|
Symfony2 > from windows to linux: routes don't work anymore |
I suggest you remove your cache (php app/console cache:clear) - if you
remove a route and it still works then this sounds very much like caching.
With regards to the path vs pattern question - from the Routing Docs
New in version 2.2: The path option is new in Symfony2.2, pattern is used
in older versions.
|
Android - Mount a Samba share in code |
Probably smbfs/cifs are currently not supported by your kernel. As Delyan
said, ensure your kernel can mount these filesystem :
$ cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev debugfs
nodev sockfs
nodev usbfs
....
If they are not listed, you should try to do a modprobing (sometimes the
module you want just have to be activated), get root access then :
# modprobe <modulename(without.ko)>
e.g. :
# modprobe cifs
If it doesn't work you will have to change or recompile your kernel
(including appropriate modules).
|
Apache/php cannot access remote cifs/samba share |
have you tried
//ip/foleder/ /mnt/name cifs
username=user,password=passwd,nounix,noserverino,defaults,users,auto,gid=33,uid=33
0 0
change gid and uid to the apache user
u can find it out like this:
cat /etc/passwd | grep www-data
|
samba shares seen in windows, but cannot connect |
Add the following to your [global] section:
guest account = nfsnobody
map to guest = bad user
And your public share could look something like:
[Backups-Rhonda]
path = /raid1/rhonda
writable = yes
guest ok = yes
public = yes
force user = root
force group = root
create mask = 666
directory mask = 666
security mask = 666
force create mode = 666
Make sure to restart the samba service.
|
Why would my samba connection fail after an upgrade to windows 2012? |
Windows Server 2012 includes latest version of SMB protocol 3.0 and it full
of really interesting updates and improvements (details and some relevant
discussion here). As with any serious improvements there is a compromise in
terms of legacy clients support.
Probably there is no support for SMB 3.0 on your Samba client side or some
backward compatibility should be enabled on Server 2012 side.
|
How to access a shared location in solaris from windows machine using samba with java? |
"Connection refused" means that host is not listening on that port. You
need to ensure the samba service is running on that host.
I would check you can mount the file system as a drive letter first.
|
Facebook Doesn't appear on share windows when trying to share an Image |
after correcting my childish mistake (see EDIT part in question) and Using
this code snippet I finally solved this problem.
if anybody knows whats the difference between using contentValue and my
approach please share that with me.
|
Moved from linux/apache to IIs and codeigniter DB_driver.php is giving me errors, i can't have empty fields anymore? |
You could change the controller info to:
$postdata = array (
'Nom'=> $_POST['Nom'],
'Prenom'=> $_POST['Prenom'],
'Initial'=> $_POST['Initial'],
'Responsable'=> $_POST['Responsable'],
'DateNaissance'=> ($_POST['DateNaissance']=='') ? 0 :
$_POST['DateNaissance'];
);
See is that removes the error - I get the error message of (before the
change)
'Data truncated for column 'DateNaissance' at row 1'
|
No Windows Store apps (anymore) in Visual Studio 2013 Preview |
If your creating a new project then it targets 8.1 only.
If you open an existing 8.0 project then you can open and edit it...or
re-target it to 8.1.
So the implication is IF you are on Windows 8, you might be ok in loading
existing Windows Store App 8.0 projects...you just won't be able to create
new ones...as they target 8.1.
See these references:
http://gyorgybalassy.wordpress.com/2013/06/29/you-can-target-only-windows-81-with-vs2013/
http://tedwvc.wordpress.com/2013/07/19/visual-studio-2013-support-for-targeting-windows-8/
|
Write C++ on Windows but use Linux System calls through a Linux emulator |
You've already tagged your question with Cygwin. That seems like the best
solution for what you want. Cygwin is basically a collection of programs
which emulate a GNU/LInux environment through the use of a
DLL (cygwin1.dll) which acts as a Linux API layer providing
substantial Linux API functionality.
Here's the link to the documentation for its API
Edit: Most of the Cygwin source code that I've looked at is written in C++
and makes system calls using MS Windows API to do provide the *nix
emulation. The source is well written and very readable (even to to a
non-C++ programmer such as myself). I think using Cygwin would be a good
transition from programming on Windows to a GNU/Linux environment.
|
Share Serial Port on Linux |
I believe it is possible for multiple applications to access a TTY device
simultaneously. The fact that you are performing read operations from one
userspace application and write operations from another means you are
unlikely to encounter a problem.
To verify this you can read from a serial into a serial device using the
console:
cat /dev/ttyS0
If you open another terminal, you can write to the device without any
problem:
echo "stuff" > /dev/ttyS0
|
What g++/ld options make it safe to share STL containers across DSO's on Linux? |
My google-ability returned to me, and thus I found
http://gcc.gnu.org/wiki/Visibility, which I think tells me everything there
is to know. It won't tell me about gory internals of STL, but I don't think
it has to.
|
Windows File Share Timespamps |
Having tested it with two Windows 7 machines, I've found that the computer
actually writing the file to its disk is the one which sets the timestamp.
(Computer B in this scenario).
I tested both created and modified timestamps and both were set by the host
machine.
|
Share Photoshop license between Windows and Mac |
Adobe does not have a license that allows you to put software on two
different types of machines - the license is specific to Windows or Mac,
though in the terms two Macs or two PCs are permitted if they are YOUR
machines.
Adobe Creative Cloud, however, does allow two different architectures (Mac
and PC) to be licensed simultaneously. Creative Cloud, however is a
"rental" model, not a perpetual (full) license.
|
How Should I Debug Samba with GDB |
Download samba source code from http://www.samba.org and compile it
(without source code, it will be impossible to do symbolic debugging).
Stop or kill any other samba instances.
Start samba under gdb:
gdb <path/to/compiled/smbd>
Specify smbd parameters:
set args -i -M single
Parameters -i -M single force smbd to start as single process, do not
daemonize and print all messages and errors to stdout/stderr.
Now, you can set breakpoints and trace your source code as you normally
would with any other program.
Note: instead of using gdb, you might find more convenient to use gdb-tui
(gdb text user interface), or use other debuggers like ddd.
|
mount remote windows share from centos |
The mount.cifs file is provided by the samba-client package. This can be
installed from the standard CentOS yum repository by running the following
command:
yum install samba samba-client
Once installed, you can mount a Windows SMB share on your CentOS server by
running the following command:
Syntax:
mount.cifs //SERVER_ADDRESS/SHARE_NAME MOUNT_POINT -o user=USERNAME
SERVER_ADDRESS: Windows system’s IP address or hostname
SHARE_NAME: The name of the shared folder configured on the Windows system
USERNAME: Windows user that has access to this share
MOUNT_POINT: The local mount point on your CentOS server
I am mounting to a share from \10.11.10.26snaps
Make a directory under mount for your reference
mkdir /mnt/mymount
Now I am mounting the snaps folder from indiafps02, User
|
Write to a windows network share from unix |
Because in Unix/Linux this is not the right path
String filePath = "\\myserver\dir";
I suggest to check such path exist, and 99% chances you will not have
permission to create them. It would be more or less
String filePath = "/usr/xx/";
Creating folder:
File temp = new File("temp");
boolean test = temp.mkDir();
|
How do you share events accross windows on same domain? |
I had the same scenario recently. The key is to find a high level DOM
element that can be referenced by either the child or parent to dispatch
the event on such as an app container div.
I had multiple iframes and so passed a "targetFrame" id so that only the
correct one would execute given that all frames caught the event (best
practice MVC loose coupling). You can also dynamically add any parameters
you like.
Sample code for child iFrame to fire event to container:
var evt = document.createEvent('Event');
evt.initEvent('myEvent', true, true);
evt.targetFrame = "Frame1";
element = parent.document.getElementById('containerDiv'); //
$('#containerDiv') for parent
element.dispatchEvent(evt);
Code for child iframe to listen for events:
parent.document.addEventListener('myEvent', funct
|
Share Windows folder outside my local network |
Oh my!
First, this is an extremely bad idea to open a network share to the outside
world.
Access databases are shared as normal files through the smb protocol.
That protocol is not really secure and opening your machine as such (you
need to open and forward TCP port 139) would certainly invite lots of
unwanted attention (in short, your machine will probably be exposed and
taken over in a matter of a few minutes/hours unless you know exactly what
you are doing to secure it).
Second, letting people access an Access database over anything else than a
fast wired LAN is another extremely bad idea (WiFI, even if it's on a local
network, is bad because it's unreliable and drops in the connection can
damage the access file).
The only ways you can share an Access database over the internet are:
|
How to Share My News on Facebook on Windows Phone 8 |
Use the ShareStatusTask
private void Button_Click(object sender, RoutedEventArgs e)
{
//theMessageStatus is the message you want to post to FB/Twitter
ShareNewsArticle(theMessageStatus);
}
private void ShareNewsArticle(string message)
{
ShareStatusTask sst = new ShareStatusTask();
sst.Status = message;
sst.Show();
}
This will let the user choose what social network to update (e.g. FB,
Twitter etc..)
|
Automount samba folder on Mac |
I followed
https://discussions.apple.com/thread/3221944?start=15&tstart=0
The key is setting the mount point in your home directory is by following
three steps.
Add this line to the end of /etc/auto_master:
/- auto_smb
Created /etc/auto_smb with the following line:
/Users/user/mount -fstype=smbfs,soft
smb://domain;user:password@server/folder
Run automount:
automount -vc
The troubleshooting points are:
If you encounter "Too many users" you need to review your SMB path for
syntax errors.
Also be careful of incorrect username / passwords, or passwords with
special symbols. e.g. @ would need to be replaced with %40.
|
Alternative for file access in windows share files |
The Samba suite provides windows file server functionality for unix
systems.
Also you might like to look at NFS.
Even OCFS2 might be an alternative.
|
Possible to share cache item amongst multiple windows services? |
Adrian Thompson Phillips hit the nail on the head with a distributed cache.
I think that will be your best bet.
The only thing I'll add, is that I would consider App Fabric
(http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx) since it's
Microsoft's version of a distributed cache.
You can even run App Fabric nodes on the same machine that has the Windows
services. You don't need dedicated cache nodes in the cluster.
|
Faster way to access a file on a Windows 7 network share? |
The issue was with nslookup taking a while to resolve the name. Using the
IP of the network drive directly instead of using the name fixed the
problem. We will probably end up putting all our addresses in the hosts
file (system32driversetc) for Windows.
|
Share project between Windows Store Application And WCF Service |
To share code between the two projects create a Portable Class Library
(PCL) project and reference it in the two projects.
Make sure you choose the right .Net framework (for compatibility with WCF
project).
|
Firefox extension - Share common state between two or more windows |
Am I correct to assume you're developing a XUL overlay add-on, and not an
SDK add-on?
One way to share state between windows is to use Javascript code modules. A
code module will only be loaded once (unless explicitly unloaded) and
therefore will expose the same data to multiple windows. Be sure to read
the "Sharing objects using code modules"., However, please note that
therefore when closing a window, any state associated with it and stored
within the code module must be cleaned up, or would leak otherwise.
If you're using the SDK instead, your main.js module is already the
equivalent of a code module. Content scripts may use message passing to
store and retrieve state from your module.
|
Is it possible to add search/share contracts on my windows phone apps? |
i think this link might help you..
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286414%28v=vs.105%29.aspx
this is walkthrough to use and search in contacts. i hope it might help.
|
authenticate against with Active Directory via samba |
I recommend you this article
http://technet.microsoft.com/en-us/magazine/2008.12.linux.aspx from
Microsoft.
The configure file seems OK.
|
How to share/distribute compiled for Blackberry 10 and Windows 8 mobile development |
For BlackBerry 10, you can use standard shared objects (.so files) or
archives (.a files). They are standard C/C++ libraries.
On Windows 8/Windows Phone 8, using C#, you can create a Portable Class
Library.
|
iOS file sharing with SAMBA / CIFS protocol |
If I understood you correctly you want to connect with your app files via
WiFi .
Basically you need to open a local server within your app.
CocoaHTTPServer may be help you with this issue.
|
qt transfer a file from local to a samba shared |
You can not do that QFile just spports local files but you can mount it to
a posix folder and access to that folder.
You can find a guide about how to mount a samba shared folder here
|
Windows Forms - VB.NET Check if Network Folder Exists without share access? |
Generally, it's good security practice to not acknowledge the existence of
something unless the requesting party has access rights to it. The file
share server (samba?) is most likely just following this principle and you
cannot change it if you really have zero access rights.
|
Windows file sharing: What ACE AccessMask flags correspond to the different share permissions? |
I've found out the following by trial-and-error:
For Read permission you need to use 0x1200A9. This corresponds to the
following flags:
FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory)
1 (0x1)
FILE_READ_EA
8 (0x8)
FILE_EXECUTE (file) or FILE_TRAVERSE (directory)
32 (0x20)
FILE_READ_ATTRIBUTES
128 (0x80)
READ_CONTROL
131072 (0x20000)
SYNCHRONIZE
1048576 (0x100000)
For Change permission you need to use 0x1301BF. This corresponds to the
following additional flags:
FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory)
2 (0x2)
FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory)
4 (0x4)
FILE_WRITE_EA
16 (0x10)
FILE_WRITE_ATTRIBUTES
256 (0x100)
DELETE
65536 (0x10000)
For Full Control permission you need to use 0x1F01FF. This corresponds to
the following additional f
|
File not written to by System.Data.SQLite on windows share after network failure |
See section 3 of How To Corrupt An SQLite Database File; it appears that
Windows did not sync the network share when SQLite told it to.
|
Making a user in Samba - Debian 6 32bit - No commands working? |
Solution:
Setup
Apt-get upgrade
sudo apt-get install samba smbfs
sudo mkdir –m 0777 /pathofdrive
Editing the samba config
sudo vi /etc/samba/smb.conf
Copy this:
# Global parameters
[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User
# Share
[Data]
path = /disk2/data
valid users = joel
read only = No
create mask = 0777
directory mask = 0777
Adding a user:
# useradd -c "Joel Nahrgang" joel
# smbpasswd -a joel
New SMB password: secret
Reenter SMB password: secret
Added user joel
Restarting Samba:
|
perl based cron job won't write to mounted cifs/windows share ONLY after long inactivity |
how about putting a
umount -f -v /mnt/shared_drive
mount -v -a
into a root cron job just before your script runs. That way you don't need
to sudo in your script and have the password in plain sight. -v might give
you a hint on what is happening to make it stale
|
getaddrinfo() - Linux VS Windows |
There are these magical things called man pages. For example, man 3
getaddrinfo clearly says that
If the AI_PASSIVE flag is specified in hints.ai_flags, and node is
NULL, then the returned socket addresses will be suitable for
bind()ing a socket that will accept() connections. The returned
socket address will contain the "wildcard address" (INADDR_ANY for
IPv4 addresses, IN6ADDR_ANY_INIT for IPv6 address). The wildcard
address is used by applications (typically servers) that intend to
accept connections on any of the hosts's network addresses. If node
is not NULL, then the AI_PASSIVE flag is ignored.
The purpose of the getaddrinfo() function is simple: it tries its best to
convert user-specified strings into numeric data an application can use to
create a socket, eit
|
Windows and linux max threads |
Linux, it's pretty easy. cat /proc/sys/kernel/threads-max
Windows, less so. Basically it depends on how much ram you have / how much
you allocate on each thread's stack - see What's the maximum number of
threads in Windows Server 2003?; but basically <1000
|