Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-01-2007, 10:06 AM
|
#1
|
Member
Registered: Oct 2004
Location: Portugal
Distribution: Debian, Slackware
Posts: 78
Rep:
|
Creating a link from "." to other directory on SCP
Hello,
I'm using scp to copy files to a server. I have a user directory in the server and a subdirectory. This is the directories:
Server:
/home/user
/home/user/subdir
My problem is: Using the command "scp files user@server:.", how can I link the "." directory to the subdir to copy the files to /home/user/subdir instead of the /home/user?
Thanks.
|
|
|
02-01-2007, 10:22 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Rep:
|
Code:
scp files user@server:./subdir/
As the default current directory "." is /home/user, ./subdir/ is the same as /home/user/subdir/.
PS: I am not sure if the last slash in subdir/ is really necessary. But it not hurts.
Last edited by marozsas; 02-01-2007 at 10:23 AM.
|
|
|
02-01-2007, 10:26 AM
|
#3
|
Member
Registered: Oct 2004
Location: Portugal
Distribution: Debian, Slackware
Posts: 78
Original Poster
Rep:
|
You didn't understand the question, my problem is that I can't change the format of the command "scp files user@server:.".
|
|
|
02-01-2007, 10:41 AM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Rep:
|
oh, I see....
Can you change your home dir in the remote system to /home/user/subdir ?
Or create a new bogus user with the home dir set to /home/user/subdir ?
What are you try to accomplish ?
May be you can use other transfer programs over ssh, like rsync.
Would be nice if you develop your question a little more....
|
|
|
02-01-2007, 10:54 AM
|
#5
|
Member
Registered: Oct 2004
Location: Portugal
Distribution: Debian, Slackware
Posts: 78
Original Poster
Rep:
|
Well,
The "user" on that server was copying files with normal scp to its homedir. Now I want to convert the user to copy the files using scponly. Doing the chroot environment in the server the homedir will be:
/home/user/ -> owned by root
/home/user/"chroot system files and directories" -> owned by root
/home/user/subdir -> owned by user
With this scenario, the user only have permission to copy the files to subdir, and I want to be that way. Now I don't want to tell to the user client about the server changes, this should be transparent, so the command "scp files user@server:." shouldn't change. Instead the server should be capable of redirect the incoming files to the subdir.
|
|
|
All times are GMT -5. The time now is 10:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|