Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 17019  / 3 Years ago, tue, august 31, 2021, 4:39:52

I'm using cygwin in windows 7 to copy a directory to an ubuntu machine using this command.



scp -rp -P 54322 /cygdrive/c/xampp/htdocs/. [email protected]:/home/user/somefolder/


After copying all the files, they all have "no read, no write" permissions. Does anyone know why?



Alternatively if I copy /cygdrive/c/xampp/htdocs/ to /cygdrive/c/Users/user and then use scp to copy the files. The permissions are correct.



---------- 1 user user 1273 Apr 21 16:32 about.html
---------- 1 user user 1707 Apr 21 16:33 contact.html
d--------- 2 user user 4096 Apr 21 04:14 images
---------- 1 user user 2259 Apr 21 22:27 index.html
---------- 1 user user 1252 Apr 21 16:33 projects.html
---------- 1 user user 823 Apr 22 22:03 style.css
drwx------ 6 user user 4096 Apr 21 02:11 xampp

More From » ssh

 Answers
4

I've had some issues with rsync/ssh and cygwin, this is how I managed to solve:




  • Disable acl's as these cannot be properly mapped to Linux ACL's

  • Check mount options before changing:



$ mount



D:/ProgramsVista/ICW/etc/terminfo on /usr/share/terminfo type ntfs (binary,noacl)
D:/ProgramsVista/ICW/bin on /usr/bin type ntfs (binary,noacl)
D:/ProgramsVista/ICW/lib on /usr/lib type ntfs (binary,auto)
D:/ProgramsVista/ICW on / type ntfs (binary,noacl)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,posix=0,user,noumount,auto)



  • Change setting for ACL's



cp /etc/fstab /etc/fstab.install



echo "none /cygdrive cygdrive binary,posix=0,user,noacl 0 0" >> /etc/fstab




  • To activate the new setting, logout and login again



logout
ssh Adminstrator@hostname




  • Check the new setting for "noacl":



$ mount



D:/ProgramsVista/ICW/etc/terminfo on /usr/share/terminfo type ntfs (binary,noacl)
D:/ProgramsVista/ICW/bin on /usr/bin type ntfs (binary,noacl)
D:/ProgramsVista/ICW/lib on /usr/lib type ntfs (binary,auto)
D:/ProgramsVista/ICW on / type ntfs (binary,noacl)
C: on /cygdrive/c type ntfs (binary,noacl,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,noacl,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,noacl,posix=0,user,noumount,auto)


(sorry can't seem to get the formatting right this morning.)


[#39115] Tuesday, August 31, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
smelrop

Total Points: 263
Total Questions: 122
Total Answers: 108

Location: Saudi Arabia
Member since Thu, Jan 28, 2021
3 Years ago
smelrop questions
Mon, Mar 13, 23, 07:22, 1 Year ago
Sun, Feb 5, 23, 13:02, 1 Year ago
Tue, Aug 31, 21, 00:50, 3 Years ago
Sat, Dec 18, 21, 15:18, 2 Years ago
;