# Make file executable in File class

**URL:** <https://forum.juce.com/t/make-file-executable-in-file-class/3883>\
**Category:** Linux\
**Created:** [May 4, 2009, 2:59pm UTC](https://forum.juce.com/t/make-file-executable-in-file-class/3883 "2009-05-04T14:59:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [May 4, 2009, 2:59pm UTC](https://forum.juce.com/t/make-file-executable-in-file-class/3883/1 "2009-05-04T14:59:59Z")

</div>

There is no way to make a file executable on linux, if you create a new file then the umask setting makes the file without the X attribute and you can’t launch it with the File class, i think it might be useful to have some control over the executable bit on linux/osx (perhaps mix it with file attributes on windows)

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 4, 2009, 7:35pm UTC](https://forum.juce.com/t/make-file-executable-in-file-class/3883/2 "2009-05-04T19:35:52Z")

</div>

Fair point, I’ll add something that when I get a moment. In the meantime, I guess it’s pretty easy just to add a quick call to whatever the unix function is to do it though.

---

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [May 4, 2009, 9:14pm UTC](https://forum.juce.com/t/make-file-executable-in-file-class/3883/3 "2009-05-04T21:14:44Z")

</div>

yeah i did it just wanted to mention that would be nice

```auto
							#ifdef LINUX
								chmod (File::getSpecialLocation(File::currentExecutableFile).getFullPathName().toUTF8(), S_IROTH|S_IRGRP|S_IRWXU);
							#endif
```
