[cs631apue] Fwd: HW2 Access Mode Question
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).
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:
> 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?
>> cs631apue mailing list
>> cs631apue at lists.stevens.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cs631apue