Sponsored Content
Full Discussion: scp links! wrong permissions
Top Forums Shell Programming and Scripting scp links! wrong permissions Post 302461072 by halacil on Friday 8th of October 2010 11:18:20 AM
Old 10-08-2010
tried but it didnt work ...

Code:
[root@nodedb02 bin]# scp -p nodedb01:/bin/mailx /bin/
root@nodedb01's password:
mailx                                                                            100%   83KB  82.9KB/s   00:00
[root@nodedb02 bin]# ls -ltr | grep mail
-rwxr-xr-x 1 root root   84856 Jul 13  2006 mailx.orig
-rwxr-xr-x 1 root root   84856 Jul 13  2006 mailx
-rwxr-xr-x 1 root root   84856 Oct  5 11:52 mail
[root@nodedb02 bin]#


on the source the owner is mail but here it created it as root!! still the l in the beggining of the line is missing ( lrwxrwxrwx )
and didnt create it as a link

Code:
[oracle@source bin]$ ls -ltr | grep mail
-rwxr-xr-x 1 root mail   84856 Jul 13  2006 mail
lrwxrwxrwx 1 root root       4 Sep 27 11:51 mailx -> mail

Moderator's Comments:
Mod Comment Use code tags!
 

8 More Discussions You Might Find Interesting

1. Solaris

SCP from one solaris box to another without copying links

I am doing a scp (directory)from one solaris box to another.The problem is that all links present in that directory also get copied .I do not want the links to get copied .currently I am using following syntax scp -rvp pcserver info@appudemo.sea.us.wam.net:/home/info I checked the man... (1 Reply)
Discussion started by: u449064
1 Replies

2. UNIX for Advanced & Expert Users

About links

why directory has two links as default. what's the purpose? (1 Reply)
Discussion started by: nagalenoj
1 Replies

3. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

4. Debian

scp not preserving properties and links

I'm trying to get a number of old disks on HP-UX 10.2 copied over to a new Debian machine which has a NAS on it. The HP does not have rsync, but does have scp. Scp unfortunately does not always preserve permissions, and does not save links which were on the disk. Apparently rsync has a flag... (3 Replies)
Discussion started by: PasadenaDave
3 Replies

5. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

6. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

7. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

8. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies
list link(1m)															     list link(1m)

NAME
list link - Displays a list of all the soft links whose names match the link name that you specify SYNOPSIS
cdscp list link link-name [with attribute-name = attribute-value] ARGUMENTS
The full name of a specific soft link. The last simple name can contain wildcard characters. The name of a particular attribute. The value of a particular attribute. DESCRIPTION
The list link command displays a list of all the soft links whose names match the link name that you specify. The last simple name can contain wildcard characters. You can use a with attribute-name = attribute-value clause to limit output only to soft links whose attributes have values equal to the specified values. A space must precede and follow the = (equals sign). This command does not list the name of the directory, object entry, or other soft link to which the soft link points. Privilege Required You must have read permission to the directory that stores the soft link. If you use a with attribute-name = attribute-value clause in the command, you also need read or test permission to the selected soft links. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command displays a list of all the soft links whose names begin with the letter l in the directory /.:/admin. cdscp> list link /.:/admin/l* LIST SOFTLINK /.../abc.com/admin AT 1991-10-15-15:54:38 lnk01 lnk02 lnk03 lnk04 lnk05 lnk06 RELATED INFORMATION
Commands: create link(1m), delete link(1m), remove link(1m), set link(1m), show link(1m) list link(1m)
All times are GMT -4. The time now is 10:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy