On Tue, Sep 27, 2011 at 2:49 PM, Miklos Szeredi <miklos@...> wrote:
> Hans Beckérus <hans.beckerus@...> writes:
>> Hi. If I use the umask mount option, it seems fuse ignores any file
>> modes that I return from my fs in eg. getattr().
>> Fine, but then should not the default priority be 777+umask and
>> 666+umask for directories and regular files respectively.
>> Now it seems if I give a umask of 0022, regular files become
>> -rwxr-x-r-x (755) which is the same as for directories?
>> Or am i using this option wrong? I honestly thought that umask would
>> only mask on top of what I returned in st_mode and not override it
> Yeah, that's how it's supposed to work. I agree, that it's confusing,
> but it would be difficult to change the meaning of the "umask" option
That is ok, I also realize that umask is intended to be used for
_setting_ the mode at file creation,
just like umask works in any unix environment. But, I still do not
think it is correct to apply 0777+umask
for both files and directories. AFAIK, standards (may it be somewhat
unclear) state that it should be
0666 for files, that is files should not obtain execution mode by
default, only directories.
> What we can do is to introduce another option, if necessary. What
> exactly do you need this for?
No need for a new option. I have already implemented my own umask
option for the fs that only applies to files for which my fs lacks
enough information to build a valid st_mode field. But I also would
like the possibility to do it globally using the FUSE option.