维护档案中的文件和文件夹权限 [英] Maintain file and folder permissions inside archives

查看:98
本文介绍了维护档案中的文件和文件夹权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在打包和分发我为Windows,Linux和Mac制作的程序.我打算将文件和文件夹放在zip归档文件中.

I am packaging and distributing a program I made for Windows,Linux and Mac. I plan to put the files and folders in zip archives.

如果我设置了正确的文件夹和文件权限,然后压缩为zip并重新分发,那么当用户在Linux或Mac系统中提取它们时,这些权限是否会得到维护?还是他们必须自己设置权限?

If I set the correct folder and file permissions and then compress into zip and redistribute them, will those permissions be maintained when the user extracts them in Linux or Mac systems ? Or do they have to set the permissions themselves ?

推荐答案

zip不在存档中存储文件权限.

zip does not store file permissions in the archive.

tar归档文件将保留Linux和OS X上的文件权限.我不知道Windows上会发生什么.如果您可以在Windows上进行测试并且可以正常工作,那么这可能是您最好的选择.这可能取决于人们用来解压缩档案的工具.

tar archives will preserve file permissions on Linux and OS X. I have no idea what happens on Windows. If you can test things out on Windows and it works, this is probably your best bet. It probably depends on what tool people use to unpack the archives.

另一个选择是创建安装程序,尽管很少有用于创建跨平台安装程序的非商业选项. Wikipedia有列表.

Another option would be to create an installer, although there are few non-commercial options for creating cross-platform installers. Wikipedia has a list.

这篇关于维护档案中的文件和文件夹权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆