[Gambas-user] [Gambas Bug Tracker] Bug #1216: umask ignored by gambas while Mkdir command used

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sun Dec 17 03:11:22 CET 2017


http://gambaswiki.org/bugtracker/edit?object=BUG.1216&from=L21haW4-

Comment #8 by Damien COTTIER:

Hi,

there is no technical issue except for directories created & use somewhere in a gambas component (the path might be not accessible directly through the user API
ex getting object through hash of a directory/filename path).
ex:
Client1 App => (Component do Mkdir) => Write Files into Dir
Client1 App <= (Component generate Hash and client1 push to DB) => DB
Client2 App => (get Hash from db and give to component) <= DB
Client2 App <= (Component cannot read file into dir) <= Read Files from Dir Fail

i'm just wondering why gambas use different default behavior than standard linux mkdir command.

in gambas i would expect that runing Shell "mkdir foo"
will be the same as Mkdir "foo"

Futhermore, major distribution like ubuntu currently set group autorisation by default on directory,
but create a group for each login allowing by default user isolation.
One can then easily share a directory by changing group owner (using chgrp) rather than playing with chmod after each directory creation. I think this is the reason of the "users" group existance. Indeed, The benefit of groups versus chmod is the use of "s" bit allowing you can progagate group ownership to child directories.

Some system still use umask to propagate more restrictive permissions to child process, but umask can only be more restrictive not less.




More information about the User mailing list