Article 57ADK File permissions with tar

File permissions with tar

by
yod
from LinuxQuestions.org on (#57ADK)
Hello, I have a file, mybackuplist, with a list of paths:
/home/yod/somefile
/home/yod/Documents/someotherfile

etc...
I use it to make a tarball with the following command
tar -cpvf backup.tar -T mybackuplist
I noticed that the file permissions are indeed saved but the directories permissions are lost,
so someotherfile maintains the correct permissions
but
/home/yod/Documents
/home/yod
/home

lose the permissions

Now, if in the file list, I specificy the directory instead of the file, the directory and the file permission are saved correctly.
So if in mybackuplist I specify
/home/yod/Documents/
The permissions of
/home/yod/Documents/
/home/yod/Documents/someotherfile

are saved correctly

I wonder if there is a way to specify the file and not lose the parents directories permissions.
Im using tar but I wouldn't mind using something elselatest?d=yIl2AUoC8zA latest?i=77Y5nOD1xtg:eGIT3wG6-is:F7zBnMy latest?i=77Y5nOD1xtg:eGIT3wG6-is:V_sGLiP latest?d=qj6IDK7rITs latest?i=77Y5nOD1xtg:eGIT3wG6-is:gIN9vFw77Y5nOD1xtg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments