scp to a symlink to a mounted hard drive failed
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I tried to scp from an external machine to my machine but failed:
$ scp -rp /home/externaluser/pd/folder myIP:pd/
scp: pd/: File exists
I have checked the permission:
$ ls -l /home/externaluser/
lrwxrwxrwx 1 externaluser externaluser 56 Mar 3 17:42 pd -> /run/media/superuser/external_xfs_hd/pd
And the folder is empty:
$ ll /run/media/superuser/external_xfs_hd/pd
total 0
The strange thing is that if I scp to /home/externaluser then it works:
$ scp -rp /home/externaluser/pd/folder myIP:
Any idea?
Update #1:
Followed Danfossi's suggestion to try rsync:
$ rsync -avz -e ssh /home/externaluser/pd externaluser@myIP:/home/externaluser/pd
sending incremental file list
rsync: ERROR: cannot stat destination "/home/externaluser/pd": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [Receiver=3.0.9]
rsync: connection unexpectedly closed (187 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
$
Here is the info of the mounted external drive:
$ df -T /dev/sdb
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb xfs 1952560720 32992 1952527728 1% /run/media/superuser/external_xfs_hd
It was mounted by nautilus when I clicked on it.
linux external-hard-drive mount symbolic-link scp
add a comment |
I tried to scp from an external machine to my machine but failed:
$ scp -rp /home/externaluser/pd/folder myIP:pd/
scp: pd/: File exists
I have checked the permission:
$ ls -l /home/externaluser/
lrwxrwxrwx 1 externaluser externaluser 56 Mar 3 17:42 pd -> /run/media/superuser/external_xfs_hd/pd
And the folder is empty:
$ ll /run/media/superuser/external_xfs_hd/pd
total 0
The strange thing is that if I scp to /home/externaluser then it works:
$ scp -rp /home/externaluser/pd/folder myIP:
Any idea?
Update #1:
Followed Danfossi's suggestion to try rsync:
$ rsync -avz -e ssh /home/externaluser/pd externaluser@myIP:/home/externaluser/pd
sending incremental file list
rsync: ERROR: cannot stat destination "/home/externaluser/pd": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [Receiver=3.0.9]
rsync: connection unexpectedly closed (187 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
$
Here is the info of the mounted external drive:
$ df -T /dev/sdb
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb xfs 1952560720 32992 1952527728 1% /run/media/superuser/external_xfs_hd
It was mounted by nautilus when I clicked on it.
linux external-hard-drive mount symbolic-link scp
add a comment |
I tried to scp from an external machine to my machine but failed:
$ scp -rp /home/externaluser/pd/folder myIP:pd/
scp: pd/: File exists
I have checked the permission:
$ ls -l /home/externaluser/
lrwxrwxrwx 1 externaluser externaluser 56 Mar 3 17:42 pd -> /run/media/superuser/external_xfs_hd/pd
And the folder is empty:
$ ll /run/media/superuser/external_xfs_hd/pd
total 0
The strange thing is that if I scp to /home/externaluser then it works:
$ scp -rp /home/externaluser/pd/folder myIP:
Any idea?
Update #1:
Followed Danfossi's suggestion to try rsync:
$ rsync -avz -e ssh /home/externaluser/pd externaluser@myIP:/home/externaluser/pd
sending incremental file list
rsync: ERROR: cannot stat destination "/home/externaluser/pd": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [Receiver=3.0.9]
rsync: connection unexpectedly closed (187 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
$
Here is the info of the mounted external drive:
$ df -T /dev/sdb
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb xfs 1952560720 32992 1952527728 1% /run/media/superuser/external_xfs_hd
It was mounted by nautilus when I clicked on it.
linux external-hard-drive mount symbolic-link scp
I tried to scp from an external machine to my machine but failed:
$ scp -rp /home/externaluser/pd/folder myIP:pd/
scp: pd/: File exists
I have checked the permission:
$ ls -l /home/externaluser/
lrwxrwxrwx 1 externaluser externaluser 56 Mar 3 17:42 pd -> /run/media/superuser/external_xfs_hd/pd
And the folder is empty:
$ ll /run/media/superuser/external_xfs_hd/pd
total 0
The strange thing is that if I scp to /home/externaluser then it works:
$ scp -rp /home/externaluser/pd/folder myIP:
Any idea?
Update #1:
Followed Danfossi's suggestion to try rsync:
$ rsync -avz -e ssh /home/externaluser/pd externaluser@myIP:/home/externaluser/pd
sending incremental file list
rsync: ERROR: cannot stat destination "/home/externaluser/pd": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [Receiver=3.0.9]
rsync: connection unexpectedly closed (187 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
$
Here is the info of the mounted external drive:
$ df -T /dev/sdb
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb xfs 1952560720 32992 1952527728 1% /run/media/superuser/external_xfs_hd
It was mounted by nautilus when I clicked on it.
linux external-hard-drive mount symbolic-link scp
linux external-hard-drive mount symbolic-link scp
edited Mar 3 at 14:17
HCSF
asked Mar 3 at 9:55
HCSFHCSF
157
157
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Try with rsync:
$ rsync -avz -e ssh /src/dir user@remote.host:dst/dir
or with tar:
$ cd /source_dir
$ tar cf - * | ssh user@remote.host ‘(cd /destination_dir;tar xf - )’
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
1
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed thatnautilus
usedsuperuser
as the owner of/run/media/superuser
and set the directory to non executable for everyone except owner and group, causingexternaluser
not able to stat, whichrsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!
– HCSF
Mar 3 at 14:31
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410874%2fscp-to-a-symlink-to-a-mounted-hard-drive-failed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try with rsync:
$ rsync -avz -e ssh /src/dir user@remote.host:dst/dir
or with tar:
$ cd /source_dir
$ tar cf - * | ssh user@remote.host ‘(cd /destination_dir;tar xf - )’
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
1
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed thatnautilus
usedsuperuser
as the owner of/run/media/superuser
and set the directory to non executable for everyone except owner and group, causingexternaluser
not able to stat, whichrsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!
– HCSF
Mar 3 at 14:31
add a comment |
Try with rsync:
$ rsync -avz -e ssh /src/dir user@remote.host:dst/dir
or with tar:
$ cd /source_dir
$ tar cf - * | ssh user@remote.host ‘(cd /destination_dir;tar xf - )’
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
1
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed thatnautilus
usedsuperuser
as the owner of/run/media/superuser
and set the directory to non executable for everyone except owner and group, causingexternaluser
not able to stat, whichrsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!
– HCSF
Mar 3 at 14:31
add a comment |
Try with rsync:
$ rsync -avz -e ssh /src/dir user@remote.host:dst/dir
or with tar:
$ cd /source_dir
$ tar cf - * | ssh user@remote.host ‘(cd /destination_dir;tar xf - )’
Try with rsync:
$ rsync -avz -e ssh /src/dir user@remote.host:dst/dir
or with tar:
$ cd /source_dir
$ tar cf - * | ssh user@remote.host ‘(cd /destination_dir;tar xf - )’
edited Mar 3 at 14:09
answered Mar 3 at 13:29
DanfossiDanfossi
465
465
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
1
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed thatnautilus
usedsuperuser
as the owner of/run/media/superuser
and set the directory to non executable for everyone except owner and group, causingexternaluser
not able to stat, whichrsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!
– HCSF
Mar 3 at 14:31
add a comment |
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
1
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed thatnautilus
usedsuperuser
as the owner of/run/media/superuser
and set the directory to non executable for everyone except owner and group, causingexternaluser
not able to stat, whichrsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!
– HCSF
Mar 3 at 14:31
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
More info but still doesn't work :(
– HCSF
Mar 3 at 13:59
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
how do you mount the external drive ? I do not remember in what situation but I had a similar writing problem on the mount points under /run. Try to mount the external disk manually on a folder under /mnt
– Danfossi
Mar 3 at 14:10
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
It was mounted by nautilus when I (as superuser) clicked on it.
– HCSF
Mar 3 at 14:17
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
just to be sure I would tell you to try to temporarily change the mount point and try again
– Danfossi
Mar 3 at 14:25
1
1
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed that
nautilus
used superuser
as the owner of /run/media/superuser
and set the directory to non executable for everyone except owner and group, causing externaluser
not able to stat, which rsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!– HCSF
Mar 3 at 14:31
Good that you asked how I mounted. And I checked the permissions of all the parent directories of the mounted drive. Now, I noticed that
nautilus
used superuser
as the owner of /run/media/superuser
and set the directory to non executable for everyone except owner and group, causing externaluser
not able to stat, which rsync
was trying to do. Fixing the permission fixes everything. Thanks a lot for your hint!– HCSF
Mar 3 at 14:31
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410874%2fscp-to-a-symlink-to-a-mounted-hard-drive-failed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown