<div dir="ltr"><div class="gmail_quote"><br><br><div dir="ltr">Thank you Tyler. <div>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&#39;s access mode shows correct( the same with source file).</div><span><font color="#888888"><div><br></div><div>Yanqiao</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-19 16:31 GMT-04:00 Tyler Romeo <span dir="ltr">&lt;<a href="mailto:tromeo@stevens.edu" target="_blank">tromeo@stevens.edu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><i>Always</i> read the man page! Obviously it&#39;s preferred running &quot;man 2 open&quot; locally, but the following web page contains the answer to your question: <a href="http://linux.die.net/man/2/open" target="_blank">http://linux.die.net/man/2/open</a></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">-- <br>Tyler Romeo<br>Stevens Institute of Technology<br>Class of 2016</div></div></div>
<br><div class="gmail_quote"><div><div>On Sat, Sep 19, 2015 at 4:27 PM, Yanqiao Zhan <span dir="ltr">&lt;<a href="mailto:yzhan14@stevens.edu" target="_blank">yzhan14@stevens.edu</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Hi all,</div><div>I&#39;m dealing with destination file&#39;s access mode, but even I explicit mode = 777 in <i>open(const char *path,..., mode_t mode) </i>function. The new created file&#39;s access mode still miss write privilege like below.</div>-rwxr-xr-x+ 1 yzhan14 student  9881 Sep 19 16:05 b3<div><br></div><div>I have tried other mode values, regardless of missing write privilege, all are correct. <br><div><br></div><div>Anyone else meet the same problem?</div><div>Thanks,</div><div>Yanqiao<br><div><br></div></div></div></div>
<br></div></div>_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" rel="noreferrer" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></div><br></div>