Re: Android file creation permissions

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Stephen
Date:  
To: Main PLUG discussion list
Subject: Re: Android file creation permissions
woot.

On Tue, Jun 12, 2012 at 2:11 PM, Shawn Badger <> wrote:
> A quick google on the forcing permissions and I found this
>
> force create mode = 666
>
> I added it to my smb.conf and it works!!
>
> Thanks for the point in the right direction, evedently create mode
> isn't enough by itself you need to add force in front of it.
>
>
> Now the entry looks like:
>
>
> [lab-test]
>        comment = Lab test
>        path = /mnt/lab-test
>        browseable = yes
>        public = yes
>        guest ok = yes
>        share modes = yes
>        force create mode = 666
>        directory mode = 777
>        writeable = yes
>
>
>
>
> On Tue, Jun 12, 2012 at 1:33 PM, Stephen <> wrote:
>> If that share is set to use specific permissions then the app cannot make
>> them something else. So the trick is to force a specific set of permissions
>> via samba. This I know can be done. Just cannot remember how I did it.
>>
>> On Jun 12, 2012 1:19 PM, "Shawn Badger" <> wrote:
>>>
>>> I have tried that form the smb.conf, but it seems to be overridden by the
>>> app.
>>> Here is the snipit from my smb.conf for the share:
>>>
>>> [lab-test]
>>>        comment = Lab test
>>>        path = /mnt/lab-test
>>>        browseable = yes
>>>        public = yes
>>>        guest ok = yes
>>>        share modes = yes
>>>        create mode = 666
>>>        directory mode = 777
>>>        writeable = yes
>>>
>>>
>>> Just so you know this is a test for a project I am working on, hence
>>> the share comping from /mnt and the very laxed permissions. So please
>>> no comments about it being really insecure.
>>>
>>>
>>>
>>>
>>> On Tue, Jun 12, 2012 at 10:11 AM, Eric Shubert <> wrote:
>>> > On 06/12/2012 08:23 AM, Shawn Badger wrote:
>>> >>
>>> >> I have an Android tablet running Cyanogenmod 7 that is using
>>> >> CifsManager to mount a share. That all works well, but the problem I
>>> >> am having is when an application (Jotta Text editor in this case)
>>> >> creates a file on the share it creates it with a 600 file permission,
>>> >> but when I create it from a terminal it creates the file with a 666
>>> >> file permission which is what I want. I am trying to figure out how to
>>> >> change the way the application is saving the files. I have set the
>>> >> smb.conf so the default file mode  is 666 and also put file_mode=666
>>> >> in the options for CifsManager, but the applications seem to ignore
>>> >> those settings.  Does anyone know how to get the applications (without
>>> >> changing the modifying it) to stop overriding the default?
>>> >
>>> >
>>> > I usually control this on the server with the "create mask" option for
>>> > the
>>> > file share. I expect this would take precedence over whatever the
>>> > clients
>>> > may specify. YMMV of course, depending on versions etc.
>>> >
>>> > Note, permission bits can also be affected by how the server is
>>> > configured
>>> > (globally or per share) to map dos file attributes. If dos file
>>> > attributes
>>> > are a concern, I prefer storing them in the extended attributes area,
>>> > instead of mapping them to *nix permission bits:
>>> >        map archive = no
>>> >        map hidden = no
>>> >        map read only = no
>>> >        map system = no
>>> >        store dos attributes = yes
>>> >        dos filemode = yes
>>> >
>>> > HTH.
>>> >
>>> > --
>>> > -Eric 'shubes'
>>> >
>>> >
>>> > ---------------------------------------------------
>>> > PLUG-discuss mailing list -
>>> > To subscribe, unsubscribe, or to change your mail settings:
>>> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list -
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss




--
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss