umask 000

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


On Oct 13, 2015, at 4:48 PM, Camilo Vieira <camilo.vieira at gmail.com> 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 lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
> On Tue, Oct 13, 2015 at 2:14 PM, Nathaniel Biser <nbiser at outlook.com>
> 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: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20151015/c7af6941/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20151015/c7af6941/attachment.gif>


More information about the ubuntu-users mailing list