[Geany-devel] file attributes on a linux system

Lex Trotman elextr at xxxxx
Wed Apr 4 09:42:40 UTC 2012


On 4 April 2012 18:52, worthspending <worthspending at gmail.com> wrote:
> Ya know, I really don't even want to ask as I don't want to be a pest, but,
> I haven't found a good example of setting the umask prior to launching
> geany.  I would like to set the umask and  have it tied to geany only.  I
> run a lot of unattended processes, so, the line of thinking is if I make
> some type of global change I could introduce a problem to another program.
>
> I can confirm that the "save as" feature works as described in this thread.
>  No +x attribute on the saved file.

Hi,

In relation to your question, just do:

umask 666; geany

should give you read/write only for new files.

But I am not sure how you have managed to arrange for new files to
have +x as you said in your initial post, but ones created by save-as
created without +x as you say now?

Cheers
Lex

>
> Thanks
>
>
> On Tue, Apr 3, 2012 at 7:39 PM, Lex Trotman <elextr at gmail.com> wrote:
>>
>> On 4 April 2012 09:30, Lex Trotman <elextr at gmail.com> wrote:
>> > On 4 April 2012 01:56, Alexander Eberspächer
>> > <alex.eberspaecher at gmail.com> wrote:
>> >> On Sun, 1 Apr 2012 01:38:15 -0500
>> >> worthspending <worthspending at gmail.com> wrote:
>> >>
>> >>> I develop ruby code on a linux box.  For all new files Geany creates,
>> >>> the file attributes are set to include the +x executable attribute.
>> >>
>> >> Let me briefly describe a related issue: if a file with the +x
>> >> attribute
>> >> is opened in Geany and "Save as" as chosen, the saved file will lack
>> >> the +x attribute. Is this desired behaviour?
>>
>> Sorry initially misread your comment, you said "save as"
>>
>> But the reason is the same as below, it creates a new file, which will
>> get its protection from the current umask.
>>
>> That *is* desired behaviour because it is how all Unix systems work,
>> we should not be different.  Users would be surprised if Geany
>> behavior is different to all others and there is no guarantee that we
>> can actually set any specific protections since the user may not have
>> sufficient permission to do so due to the umask.
>>
>> Cheers again
>> Lex
>>
>> >
>> > This occurs when the use_atomic_file_saving option is set.  It is not
>> > "desired" but it is documented behaviour and is unavoidable.  As I
>> > said before, set the umask before running Geany.
>> >
>> > Cheers
>> > Lex
>> >
>> >>
>> >> Greetings
>> >>
>> >> Alex
>> >>
>> >> _______________________________________________
>> >> Geany-devel mailing list
>> >> Geany-devel at uvena.de
>> >> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>> _______________________________________________
>> Geany-devel mailing list
>> Geany-devel at uvena.de
>> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
>
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>



More information about the Devel mailing list