[英]Creating unix file with permission 755 with UMASK
I want to create unix file with permission of 755. if I use umask of 022, the file gets created with 644. Why is that?我想创建权限为 755 的 unix 文件。如果我使用 022 的 umask,则创建的文件为 644。这是为什么? Why files are not getting created with execute permission?
为什么没有使用执行权限创建文件? What's the way around?
有什么办法?
The x
permission is not applied by default to files.默认情况下,
x
权限不应用于文件。 It is applied to directories, and compliation programs like "make" will apply it to executable files.它应用于目录,像“make”这样的编译程序将它应用于可执行文件。 Beyond that, for the most part, the
x
permission must be applied manually.除此之外,在大多数情况下,必须手动应用
x
权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.