Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-30-2012, 01:41 AM   #1
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
Retain same permissions with wget


How can I Retain the same permissions with wget a file from ftp server.
Old 11-30-2012, 12:05 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,073

Rep: Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816
It would be better to use rsync or scp to copy files and permissions. The ftp list command will show the remote directory contents on systems that support it, but you would have to script something to parse the '.listing' file that wget retrieves and apply it to the files after the download.
Old 12-01-2012, 05:53 AM   #3
Senior Member
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,452

Rep: Reputation: 85
Also, if you want to use wget, you preserve the permissions by creating a tar archive of the file(s) first.

man tar:

-p, --preserve-permissions
extract information about file permissions (default for superuser)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does mv retain permissions pgb205 Linux - Newbie 5 08-09-2015 12:34 PM
How to resume an interrupted wget using wget.log? misterJ Linux - Software 2 06-19-2011 02:21 PM
How to retain .bashrc file? tulsi Linux - Newbie 3 09-08-2009 06:31 PM
Retain variables in C kalimat Programming 10 05-27-2009 02:36 AM
Retain old status raylhm LQ Suggestions & Feedback 9 11-15-2006 01:28 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration