简体   繁体   中英

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. Here are syscalls I've implemented: create open read write release unlink mkdir opendir readdir releasedir rmdir getattr and 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 . a.out is fine, but it's just a file, not executable (When I set manually 0777 permissions it executes fine on ./a.out ).

When permissions must be set, and how? And when compiling, how to know which files should be set exe permissions? Based on what?

I lacked chmod syscall implementation. chmod makes it work all right. Thanks @Barmar for help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM