# Feature request: Create files with write access for everyone

**URL:** <https://forum.juce.com/t/feature-request-create-files-with-write-access-for-everyone/29408>\
**Category:** General JUCE discussion\
**Created:** [September 13, 2018, 11:02am UTC](https://forum.juce.com/t/feature-request-create-files-with-write-access-for-everyone/29408 "2018-09-13T11:02:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/samuel/32/21_2.png) [@samuel](https://forum.juce.com/u/samuel)\
**Post date:** [September 13, 2018, 11:02am UTC](https://forum.juce.com/t/feature-request-create-files-with-write-access-for-everyone/29408/1 "2018-09-13T11:02:24Z")

</div>

Is it possible with JUCE to write a file to disk that has write access set for everyone on the system? I couldn’t figure out how. Below I assume it’s not possible.

```
File::setReadOnly (false)

```

will make a file writable for the current user, but not for other users. When creating a file in

```
File::SpecialLocationType::commonDocumentsDirectory

```

it should be writable for everyone. Almost all other applications on my main development machine (macOS) writing to this directory write their files with write access for everyone.

According to the comment in juce\_core/native/juce\_posix\_SharedCode.h

```
bool File::setFileReadOnlyInternal (bool shouldBeReadOnly) const
{
    // Hmm.. should we give global write permission or just the current user?
    return setFileModeFlags (fullPath, S_IWUSR | S_IWGRP | S_IWOTH, ! shouldBeReadOnly);
}

```

the current behaviour is open for discussion.

**Feature request**  
Could an additional optional parameter be added to File::setReadOnly() to make it possible to create a file with write access for everyone? E.g.

```
setReadOnly (bool shouldBeReadOnly, bool applyRecursively=false, bool forAllUsers=false)
```
