Wow, what a change to past versions … has me so excited for the new look I am about ready to stop using Linux as my daily operating system after 27 years.
Wow, what a change to past versions … has me so excited for the new look I am about ready to stop using Linux as my daily operating system after 27 years.
I do things the easiest way that gets the job done. Someone asked me recently about mounting a shared windows drive in Linux from bash. They stated they normally mount it through dolphin using:
smb://username:password@ip_address/SHARED_DRIVE
That works until you need to copy files via rsync or some other bash method. The solution is actually very simple:
mount -t cifs //ip_address/SHARED_DRIVE /mnt/directory -o user=username,password=user_password_on_windows_share,uid=500,gid=500
Just be sure you replace uid=500 with the users id in linux and gid=500 with the users group id in linux in order to be able to write files/directories with the proper permissions. Of course the mount directory, /mnt/directory, also must exist.
If you get an error about “mount error(12): Cannot Allocate Memory
the fix is:
Edit the windows registry
Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
Restart the “server” service.
In case that your OS is Windows 7 (64 bit) and you have got the message as the following:
AppleSyncNotifier.exe – Entry Point Not Found The procedure enrty point xmlTextReaderConstName could not be located in the dynamic link library libxml2.dll
#!/bin/bash
# By Ed Wiget
# This fixes dropbox sync issues on linux
# get a list of files executable now
find ~/Dropbox -type f -perm -u+x > /tmp/dropbox_files-`date +%Y%m%d`
# fix the permissions
sudo chown -R $USER ~/Dropbox
sudo chmod -R u+rw ~/Dropbox
sudo chown -R $USER ~/.dropbox
sudo chmod -R u+rw ~/.dropbox
# remove any conflicting files from the file list above step 1
grep -v -e "conflicted copy" -e "Case Conflict" /tmp/dropbox_files-`date +%Y%m%d` > /tmp/dropbox_files-`date +%Y%m%d`.txt
# set the executable permissions back
for files in `echo /tmp/dropbox_files-\`date +%Y%m%d\`.txt` ; do chmod u+x "${files}" ; done
# remove any files that are in conflict
find ~/Dropbox -type f -name \*"conflicted copy"\* -exec rm -f "{}" \;
find ~/Dropbox -type f -name \*"Case Conflict"\* -exec rm -f "{}" \;
# remove temp files
rm -f /tmp/dropbox_files-`date +%Y%m%d`
rm -f /tmp/dropbox_files-`date +%Y%m%d`.txt
Anyways, this script will fix the problems. Make sure you adjust the path if your linux install does not have dropbox at ~/Dropbox.