[cs631apue] Fwd: HW2 Access Mode Question

Yanqiao Zhan yzhan14 at stevens.edu
Sat Sep 19 17:19:43 EDT 2015


Thank you Tyler.
I found the system default umask is 022, which block open() function to
create a file with access mode equals to *77 or *66 or *22, etc. So I tried
to change umask 000 in ~/.profile, after that file's access mode shows
correct( the same with source file).

Yanqiao

2015-09-19 16:31 GMT-04:00 Tyler Romeo <tromeo at stevens.edu>:

> *Always* read the man page! Obviously it's preferred running "man 2 open"
> locally, but the following web page contains the answer to your question:
> http://linux.die.net/man/2/open
>
> --
> Tyler Romeo
> Stevens Institute of Technology
> Class of 2016
>
> On Sat, Sep 19, 2015 at 4:27 PM, Yanqiao Zhan <yzhan14 at stevens.edu> wrote:
>
>> Hi all,
>> I'm dealing with destination file's access mode, but even I explicit mode
>> = 777 in *open(const char *path,..., mode_t mode) *function. The new
>> created file's access mode still miss write privilege like below.
>> -rwxr-xr-x+ 1 yzhan14 student  9881 Sep 19 16:05 b3
>>
>> I have tried other mode values, regardless of missing write privilege,
>> all are correct.
>>
>> Anyone else meet the same problem?
>> Thanks,
>> Yanqiao
>>
>>
>> _______________________________________________
>> cs631apue mailing list
>> cs631apue at lists.stevens.edu
>> https://lists.stevens.edu/mailman/listinfo/cs631apue
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20150919/691d28bf/attachment.html>


More information about the cs631apue mailing list