w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

Categories : PHP

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).

Categories : Android

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

Categories : C++

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.

Categories : Java

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.

Categories : Windows

Mount Windows shared filder to AIX
Two options 1) The easiest would be to install the bos.cifs fileset and use smit to mount the share as a filesystem: http://www-01.ibm.com/support/docview.wss?uid=isg1fileset-1244257370 2) I would not recommend this for "newbies", but you may have better luck getting this to work by installing samba: www.samba.org

Categories : Unix

How to rename a MOUNT (mounted shared folder from Windows named mnt)
Follow these steps: Unmount: umount /mnt Create another folder /my_new_mount Mount again: mount -t cifs -o username=myusername,password=mypassword //10.80.50.50/Share /my_new_mount Update in /etc/fstab

Categories : Linux

Mounting shared folder in KVM VM error: mount: unknown filesystem type '9p'
I have a kvm guest(centos 6.4) and below you can see the result grep CONFIG_9P_FS /boot/config-$(uname -r) # CONFIG_9P_FS is not set [root@client ~]# cat /etc/redhat-release CentOS release 6.4 (Final) For more information you can look this link http://wiki.qemu.org/Documentation/9psetup Thanks

Categories : Linux

Linux Shell Script: How to detect NFS Mount-point (or the Server) is dead?
"stat" command is a somewhat cleaner way: statresult=`stat /my/mountpoint 2>&1 | grep -i "stale"` if [ "${statresult}" != "" ]; then #result not empty: mountpoint is stale; remove it umount -f /my/mountpoint fi Additionally, you can use rpcinfo to detect whether the remote nfs share is available: rpcinfo -t remote.system.net nfs > /dev/null 2>&1 if [ $? -eq 0 ]; then echo Remote NFS share available. fi Added 2013-07-15T14:31:18-05:00: I looked into this further as I am also working on a script that needs to recognize stale mountpoints. Inspired by one of the replies to "Is there a good way to detect a stale NFS mount", I think the following may be the most reliable way to check for staleness of a specific mountpoint in bash: read -t1 < <(stat -t "/my/m

Categories : Linux

linux: running self compiled kernel in qemu: VFS: Unable to mount root fs on unknown wn-block(0,0)
maybe your system image file is bad and can not be mounted. You may try these command to mount the image file and check if it is a valid root file system for linux. losetup /dev/loop0 /var/lib/libvirt/images/Debian.img kpartx -av /dev/loop0 mount /dev/mapper/loop0p1 /mnt/tmp

Categories : Linux

Linux linking a shared object
When you link with a dynamic library, you should not do : gcc -shared -m32 -o ServiceProvider.so ServiceProvider.o ../../../../system/addonlibs/libmxml.so -lpthread Instead, make sure that /yourpath/system/addonlibs (you should use the full path instead of a relative one) is in you LIBRARY_PATH. Then change you link command. export LIBRARY_PATH=/yourpath/system/addonlibs:$LIBRARY_PATH gcc -shared -m32 -o ServiceProvider.so ServiceProvider.o -lmxml -lpthread You can also write that: gcc -shared -m32 -o ServiceProvider.so ServiceProvider.o -L/yourpath/system/addonlibs -lmxml -lpthread However, to run your program, you will need to have your library path in LD_LIBRARY_PATH. If you have issues with .soand .so.1 stuff, then rename your .so to .so.1 and make a symlink from .so.1 to .so

Categories : C

Shared variable between different executables in Linux
The execve will drop all mappings in the kernel, so this technique will not work. What you can do instead is open a file (as in Vaughn's suggestion) and pass the descriptor to the child process. Open file descriptors are unchanged across an exec. Then you can map it in the child. Alternatively, investigate APIs like shm_open()/shm_unlink() which will manage a global file mapping such that other processes can use it, not just a child. But basically: you have to mmap() in the child, you can't pass anything in your address space to the child in Unix.

Categories : Linux

How to choose shared memory interfaces in Linux?
I am asking myself the same question, and I don't know the final answer, but I thought I would share my benchmarks. I have found that out-of-the box, the POSIX shm_open framework is faster than the System V shmget. In my benchmark, I write 32 GB of memory from one process and read the same 32 GB of memory and verify it. I use ZeroMQ to pass ownership tokens from the writer to the reader to keep things in sync. The memory block size is actually pretty small, 32KB, but I've found this doesn't seem to be a rate limiting factor, neither does the presence of ZeroMQ make a big difference. I've found that the net throughput using POSIX shared memory is about 40% faster than System V shared memory. Specifically, the net operation (write + read) operates at a sustained rate of 3.5 GB/s for the

Categories : Linux

Minimizing dependencies for Linux shared library
linux-gate.so.1 is a virtual DSO, meaning it doesn't really exist. The best way to explain it is just to read this link Here. To answer your question, I think your best choice is to continue linking dynamically to both of them and do a few different builds to target different distros. I have found that typically when you build for Ubuntu, it will work on several of the Debian linux systems.

Categories : C++

Linux / G++ / SFML Libary - how to choose between shared/static
To link your program against the static versions of the libraries, you would do the following: g++ test.o -o sfml-app libsfml-graphics-s.a libsfml-window-s.a libsfml-system-s.a (Assuming, of course, that these files are in your local directory.)

Categories : Linux

Why shared library (.so) in Linux need to be compiled with -fPIC flag?
The idea of shared library is that the same code can be shared by several program in memory. However, one cannot ensure that the two running program expect the library to be at the same address of their memory layout (think of the collisions if the program use different shared libraries). So the shared library is only stored once in physical memory but thanks to the Memory Management Unit, the same physical memory is seen as being in two different address by the two programs. Of course for this to work you need the code to be independent of its real address (See eg http://eli.thegreenplace.net/2011/11/03/position-independent-code-pic-in-shared-libraries/ for more precise explanations) This moreover allows you to randomize the address of the shared memory which is good for security reason

Categories : Misc

Conflict between two linux shared objects defining the same function name
Conflict symbol only detected on linkage(ld) stage, loader(ld-linux.so) don't check conflict symbol. When multiple library providing duplicated symbol, the one first loaded is used. Actually somebody can make use of this feature. By providing LD_PRELOAD=overwrite.so, overwrite.so can overwrite any function the program needed.

Categories : Linux

Building a shared library using gcc on Linux and MinGW on Windows
On Windows, you need to create an import library for the DLL. An import library looks like a static library, in that it defines all of the needed symbols, but it doesn't have the actual function implementations, it just has stubs. The import library will resolve the "undefined reference" errors while avoiding static linking. To create an import library with MinGW, follow the instructions here. The key is that when building the DLL, you must pass the option -Wl,--out-implib,libexample_dll.a to the linker to generate the import library libexample_dll.a. Then, when you compile your main executable, you use the -lexample_dll option (along with -L.) to link against the import library. So with your code, I think this should work: all: foo.o bar.o main.o gcc -shared foo.o -o libfoo.dll

Categories : C

Hiding second level dependencies in shared libraries on Linux with NetBeans
It should be possible to link the OpenCV library statically. I don't think there's much that can be done to completely hide the OpenCV library symbols in a process that loads the shared library. The following options to ld should work: ld ... -static -lopencv_core -Bdynamic ... If calling from cc, then it's like this: gcc ... -Wl,-static,-lopencv_core,-Bdynamic ... Another possibility is using dynamic loading of the library with dlopen() and finding symbols with dlsym(). This may work to hide the rest of the library's symbols. Here's an online version of the manpage for those: http://linux.die.net/man/3/dlopen.

Categories : C++

How does exporting templated C++ classes from shared library work on Linux?
Symbols related to instantiation of template are in no way different from other symbols. On Linux, shared libraries all symbols not explicitly made private are exported, so a process will use only the one provided by the "first" library (you may have to pay a little more attention to your options if you want shared libraries use symbols provided by the main executable, but it is possible as well). You can make symbols explicitly private and have a shared library use the one it provides if you need; in the past you had to play with linker scripts for that, nowadays, gcc provides options and attribute to help fine grained control. My understanding (but I'm not an expert on Windows, it is just what I read on forums like this one) is that on Windows the default is reversed and all symbols n

Categories : C++

Single copy of global variables in Linux shared library
Both B and C are used by A, and I would expect each to have its own instance of the global variable Your expectations are wrong. What you are observing here is the correct and expected behaviour. If what you expect was true, every single library out there would face a problem quite similar to the infamous diamond class hierarchy. Can someone suggest a method to allow me having to different instances of the global variable in A? As far as I know, this is not possible in C++. If you want to use different variables, you have to define them separately and pass a reference to your function: // B void myFunc(int& myVar) { ++myVar; std::cout << myVar << " "; } // C int myGlobalC = 0; void someCFunc() { myFunc(myGlobalC); } // A int myGlobalA = 0; int mai

Categories : C++

command to check status of message queue and shared memory in linux?
ipcs(1) provides information on the IPC facilities and ipcrm(1) can be used to remove the IPC objects from the system. List shared memory segments: ipcs -m List message queues: ipcs -q Remove shared memory segment created with shmkey: ipcrm -M key Remove shared memory segment identified by shmid: ipcrm -m id Remove message queue created with msgkey: ipcrm -Q key Remove message queue identified by msgid: ipcrm -q id

Categories : Linux

Cant get shared library(.so) -UnsatisfiedLink Error while testingCorrectAddress API for .war file on Jboss(Linux environment)
Need to set the path for tomcat- export PATH=$PATH:$LIBPATH CLASSPATH=$CLASSPATH:$CA_DATA export LD_LIBRARY_PATH=$LIBPATH export CA_DATA=/apps/apache-tomcat-7.0.42/shared/IstCorrectAddress/Data export JAVA_OPTS="-Djava.library.path=/apps/apache-tomcat-7.0.42/shared"

Categories : Linux

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.

Categories : Debugging

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.

Categories : Osx

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.

Categories : Misc

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.

Categories : Misc

linux shared memory fault when access an struct array in the global management struct
You are trying to access pointers that are valid only in other process (the process actually created structure and set pointer.) Any pointers saved in shared structure will not be valid in any other process. To achieve your aim you should save all data that need to be shared in shared memory and store relative offsets instead of pointers.

Categories : Linux

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.

Categories : Iphone

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

Categories : Apache

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.

Categories : Java

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:

Categories : Linux

error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file:
Your "A" system has a symlink from /usr/lib/libevent-1.4.so.2 to /usr/local/lib/libevent-1.4.so.2, system "B" does not. Chances are if you create it everything will start working. The command should be as follows. sudo ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2 As an alternative, you can add /usr/local/lib to your library path as a test by exporting "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" as a temporary fix on system "B."

Categories : Linux

Google Drive SDK - JavaScript : How to list SHARED FILES (not shared with me)
If you're looking for all owned, shared files without knowing who they are shared with, you'd need to use a search query of 'me' in owners and then further filter down the list based on which returned files have shared: true set.

Categories : Javascript

Return results where a shared value is shared between two tables and the timestamp is different
SELECT * FROM Table1 AS a INNER JOIN Table2 AS b ON a.ValueA = b.ValueA WHERE a.ValueB > b.ValueB Not sure what the exact issue you are having is, but I don't see why this wouldn't work.

Categories : SQL

Static libraries and shared objects, are symbols shared?
The code and global/static data of static library will be injected into each module which links it. So for your case, there are multiple LuaeClass::converters instances exist in your project. And you need to call luaopen_battery() in each module which links the static library. I am not sure if your crash has anything to do with static link, but I am quite sure you went to a complicated implementation. The first issue you want to address is safely converting void* to A*, B*, C*. Which class/interface you want to export to Lua? If it's class C, you can define below methods in class C: void pushThis(lua_State *L); static C* getThis(lua_State *L, int idx); Both methods use C*, so you don't need a convert function. You can use meta table to distinguish your pointers from other userdata. If

Categories : C++

Using a shared library linked with other shared libs
The most significant issue you have is that you're not linking your application against the libraries that provide the symbols that it uses. Your error message calls out the main.o contains references to boost::system::system_category(), boost::system::generic_category(), and boost::thread::detach(). Therefore, when linking main.o in to an executable binary you need to link to a library that provides these symbols, in this case by passing -lboost_system -lboost_thread. As for -undefined suppress -flat_namespace: these options have the effect of moving detection of missing symbols from build time to run time. In general you should avoid using these flags unless you have a very specific need. The reason that building your main executable with these flags "works" is that you've asked told

Categories : C++

how to know how many shared preference in shared preferences in android
Not sure if you are looking to something like this . If it is just the size then you can just do a SharedPreferences pref = getSharedPreferences(<NAME>, <MODE>); pref.getAll().size();

Categories : Android

Oracle 11g startup and mount
fix it: Connect to DB: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate; Database aready shutdown. Aready uninstall database. ORACLE instance aready close. SQL> startup nomount; ORA-12514: TNS: listner process can't recognize current service of connection describe string监听程序 SQL> startup nomount; ORA-24324: service handle not initialized ORA-01041: internal error, hostdef extension name not exists SQL> conn sys/sys as sysdba; Aready connect to idle instance SQL> startup; ORACLE instance started。 Total System Global Area 535662592 bytes Fixed Size 1334380 bytes Variable Size 234881940 bytes Data

Categories : Oracle

mount unmount without sudo
You must add /nfs entry to /etc/fstab on the server host. In the list of options of the entry must be option user or users (depends on that if you want that user could unmount the filesystem or not). Example: xx.xx.xx.xx:/ /nfs nfs rsize=4096,wsize=4096,user 0 0

Categories : Linux



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.