没有分了。请大家帮帮忙。
1 个解决方案
#1
这是tar缺省的设置:可以用 -o 和 -p 参数加以控制:
-o (x mode only) Use the user and group of the user running the pro-
gram rather than those specified in the archive. Note that this
has no significance unless -p is specified, and the program is
being run by the root user. In this case, the file modes and
flags from the archive will be restored, but ACLs or owner infor-
mation in the archive will be discarded.
-p (x mode only) Preserve file permissions. Attempt to restore the
full permissions, including owner, file modes, file flags and
ACLs, if available, for each item extracted from the archive. By
default, newly-created files are owned by the user running tar,
the file mode is restored for newly-created regular files, and
all other types of entries receive default permissions. If tar
is being run by root, the default is to restore the owner unless
the -o option is also specified.
-o (x mode only) Use the user and group of the user running the pro-
gram rather than those specified in the archive. Note that this
has no significance unless -p is specified, and the program is
being run by the root user. In this case, the file modes and
flags from the archive will be restored, but ACLs or owner infor-
mation in the archive will be discarded.
-p (x mode only) Preserve file permissions. Attempt to restore the
full permissions, including owner, file modes, file flags and
ACLs, if available, for each item extracted from the archive. By
default, newly-created files are owned by the user running tar,
the file mode is restored for newly-created regular files, and
all other types of entries receive default permissions. If tar
is being run by root, the default is to restore the owner unless
the -o option is also specified.
#1
这是tar缺省的设置:可以用 -o 和 -p 参数加以控制:
-o (x mode only) Use the user and group of the user running the pro-
gram rather than those specified in the archive. Note that this
has no significance unless -p is specified, and the program is
being run by the root user. In this case, the file modes and
flags from the archive will be restored, but ACLs or owner infor-
mation in the archive will be discarded.
-p (x mode only) Preserve file permissions. Attempt to restore the
full permissions, including owner, file modes, file flags and
ACLs, if available, for each item extracted from the archive. By
default, newly-created files are owned by the user running tar,
the file mode is restored for newly-created regular files, and
all other types of entries receive default permissions. If tar
is being run by root, the default is to restore the owner unless
the -o option is also specified.
-o (x mode only) Use the user and group of the user running the pro-
gram rather than those specified in the archive. Note that this
has no significance unless -p is specified, and the program is
being run by the root user. In this case, the file modes and
flags from the archive will be restored, but ACLs or owner infor-
mation in the archive will be discarded.
-p (x mode only) Preserve file permissions. Attempt to restore the
full permissions, including owner, file modes, file flags and
ACLs, if available, for each item extracted from the archive. By
default, newly-created files are owned by the user running tar,
the file mode is restored for newly-created regular files, and
all other types of entries receive default permissions. If tar
is being run by root, the default is to restore the owner unless
the -o option is also specified.