umask 000

Kevin O'Gorman kogorman at
Thu Oct 15 16:18:54 UTC 2015

On Oct 13, 2015, at 4:48 PM, Camilo Vieira <camilo.vieira at> wrote:
> Hi!
> I created an user marcio and changed the home directory to  /opt/files.
> I need this user create files in this diretory with rwx-rwx-rwx
> permitions, in order the allow any user to read/write/execute.
> Somebody can help me?
> Thanks!
> --
> ubuntu-users mailing list
> ubuntu-users at
> Modify settings or unsubscribe at:
> On Tue, Oct 13, 2015 at 2:14 PM, Nathaniel Biser <nbiser at>
> wrote:
> Hi,
> All you need to do to change the file permissions is this command:* chmod
> +x** files * I think that files are automatically created with read and
> write permissions...
> Hope this what you need!
> Cheers,
> Nbiser
> That only works after the files are created, and perhaps after the process
that created them has finished.  Depending on how that is done, it may be
more or less easy to arrange.  In shell, it's trivial.  In C and a number
of other languages it's the system(2) call.

To arrange this when the file is first created depends even more on the
capabilities of the language being used, and would require modifying the
system call or function that creates the file.  In C, you could modify the
arguments to fopen(3). creat(2) or open(2).   Other languages have varying
arrangements for this.

Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <>

More information about the ubuntu-users mailing list