[英]Net raid FS with FUSE, gcc -hello.c -o a.out, a.out is not executable
I'm writing net raid FS with FUSE on ubuntu. 我在ubuntu上用FUSE编写网络突袭FS。 Here are syscalls I've implemented: create
open
read
write
release
unlink
mkdir
opendir
readdir
releasedir
rmdir
getattr
and rename
. 下面是系统调用我已经实现: create
open
read
write
release
unlink
mkdir
opendir
readdir
releasedir
rmdir
getattr
和rename
。
Everything works fine, but here is such case: I wrote "hello world" in c and tried typing this: gcc hello.c -o a.out
. 一切正常,但是这里是这种情况:我用c编写了“ hello world”,然后尝试输入: gcc hello.c -o a.out
。 a.out
is fine, but it's just a file, not executable (When I set manually 0777 permissions it executes fine on ./a.out
). a.out
很好,但是它只是一个文件,而不是可执行文件(当我手动设置0777权限时,它可以在./a.out
上./a.out
执行)。
When permissions must be set, and how? 必须设置权限的时间如何? And when compiling, how to know which files should be set exe permissions? 并且在编译时,如何知道应该为哪些文件设置exe权限? Based on what? 根据什么?
I lacked chmod
syscall implementation. 我缺少chmod
syscall实现。 chmod
makes it work all right. chmod
使它正常工作。 Thanks @Barmar for help! 感谢@Barmar的帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.