Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Results 1 to 1 of 1

Thread: Retaining Directory Permissions While Using SCP

  
Bookmark and Share
  1. #1

    Default Retaining Directory Permissions While Using SCP

    Retaining Directory Permissions While Using SCP

    Retaining Directory Permissions While Using SCPSCP is a secure file transfer protocol that is used in Linux. SCP is similar to FTP that it allows you to connect to a remote server and transmit your files via the connection. However there is one thing that SCP will allow you to do that FTP will not let you and that’s the ability to retain the original directory permissions when in transport. This article will briefly explain how to do this.

    Log into your Linux server via SSH / Shell
    Locate the file or directory that you are waiting to transfer.
    Now you will connect to the remote server will you normally would using SCP, however now you will at a new attribure to the connection command. An example would be if you wanted to transfer a directory while keeping the permissions you would type the following;
    “scp -rp –preserve /your_directory_path root@remote_server:/directory”
    The addition of the “-p” attribute allows you to retain permissions while in transfer while the “-r” tells the system to recurisvely copy the entire contents of the directory.
    Using this command will allow you to transfer files quickly without the issue or worrying about reapplying permissions on the directories.

  2. # ADS
    Circuit advertisement
    Join Date
    Always
    Posts
    Many
     

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •