Re: live code seems to gratuitously unlock write permission for directories

2016-12-04 Thread Alex Tweedly
Thanks Stephen - this isn't one of my Dreamhost sites, it's still on 
on-rev.


I am 99% sure the downloads directory was readable at one time - but 
I've decided to keep the extra security of explicitly deciding which 
URLs to to give out, and to whom - rather than a more permissive (even 
if filtered and parameterized) script. That would probably be a 
different decision if I had a larger number of files - but it's 
basically only a dozen or so files, referenced from 4 or 5 pages, plus a 
few mentioned in individual emails.


Thanks everyone for the help ...

-- Alex.

On 04/12/2016 03:26, Stephen Barncard wrote:

This has been standard practice for shared hosting at Dreamhost for years.
I made an index.irev file that looked at the contents of the directory and
displayed a list, subject to filtering. Parameters set with simple txt
file. Very easy.

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sat, Dec 3, 2016 at 3:10 PM, Mike Bonner  wrote:


Most likely directory browsing is turned off.  You could change the
setting, or you could put in an irev that gets "the files" and builds a
link list dynamically, minus itself of course.

On Sat, Dec 3, 2016 at 3:54 PM, Alex Tweedly  wrote:


You're right - and I confess I don't know why the downloads folder is
inaccessible. Permission is set to 755, and there's no .htaccess file or
anything else I know of to prevent it.

Anyway - if you wanted the taskrunner files, they are :
  - taskrunner.rev
  - taskClientLib.rev
  - test-task-runner.rev
  - verybusy.rev
  - IndexFiles.rev
  - CheckURL.rev

and each one can be downloaded individually, for example

http://tweedly.org/downloads/taskrunner.rev


I guess I'll just have to find a silver lining . this must be a
security measure to keep files hidden unless I reveal the actual URLs.

And

I will very shortly change the taskRunner page to make the file entry

line

into links that are clickable.

(and btw, although I do still use taskRunner regularly, I haven't rebuilt
the executables since probably LC 5.0 - so approach with some caution :-)

-- Alex.


On 03/12/2016 20:54, Alejandro Tejada wrote:


Hi Alex,

Downloads folder in your server is not accessible.

It's not possible to download this stack either:
http://tweedly.org/showpage.lc?page=taskRunner

Al

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-03 Thread Stephen Barncard
This has been standard practice for shared hosting at Dreamhost for years.
I made an index.irev file that looked at the contents of the directory and
displayed a list, subject to filtering. Parameters set with simple txt
file. Very easy.

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sat, Dec 3, 2016 at 3:10 PM, Mike Bonner  wrote:

> Most likely directory browsing is turned off.  You could change the
> setting, or you could put in an irev that gets "the files" and builds a
> link list dynamically, minus itself of course.
>
> On Sat, Dec 3, 2016 at 3:54 PM, Alex Tweedly  wrote:
>
> > You're right - and I confess I don't know why the downloads folder is
> > inaccessible. Permission is set to 755, and there's no .htaccess file or
> > anything else I know of to prevent it.
> >
> > Anyway - if you wanted the taskrunner files, they are :
> >  - taskrunner.rev
> >  - taskClientLib.rev
> >  - test-task-runner.rev
> >  - verybusy.rev
> >  - IndexFiles.rev
> >  - CheckURL.rev
> >
> > and each one can be downloaded individually, for example
> >
> > http://tweedly.org/downloads/taskrunner.rev
> >
> >
> > I guess I'll just have to find a silver lining . this must be a
> > security measure to keep files hidden unless I reveal the actual URLs.
> And
> > I will very shortly change the taskRunner page to make the file entry
> line
> > into links that are clickable.
> >
> > (and btw, although I do still use taskRunner regularly, I haven't rebuilt
> > the executables since probably LC 5.0 - so approach with some caution :-)
> >
> > -- Alex.
> >
> >
> > On 03/12/2016 20:54, Alejandro Tejada wrote:
> >
> >> Hi Alex,
> >>
> >> Downloads folder in your server is not accessible.
> >>
> >> It's not possible to download this stack either:
> >> http://tweedly.org/showpage.lc?page=taskRunner
> >>
> >> Al
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-03 Thread Mike Bonner
Most likely directory browsing is turned off.  You could change the
setting, or you could put in an irev that gets "the files" and builds a
link list dynamically, minus itself of course.

On Sat, Dec 3, 2016 at 3:54 PM, Alex Tweedly  wrote:

> You're right - and I confess I don't know why the downloads folder is
> inaccessible. Permission is set to 755, and there's no .htaccess file or
> anything else I know of to prevent it.
>
> Anyway - if you wanted the taskrunner files, they are :
>  - taskrunner.rev
>  - taskClientLib.rev
>  - test-task-runner.rev
>  - verybusy.rev
>  - IndexFiles.rev
>  - CheckURL.rev
>
> and each one can be downloaded individually, for example
>
> http://tweedly.org/downloads/taskrunner.rev
>
>
> I guess I'll just have to find a silver lining . this must be a
> security measure to keep files hidden unless I reveal the actual URLs. And
> I will very shortly change the taskRunner page to make the file entry line
> into links that are clickable.
>
> (and btw, although I do still use taskRunner regularly, I haven't rebuilt
> the executables since probably LC 5.0 - so approach with some caution :-)
>
> -- Alex.
>
>
> On 03/12/2016 20:54, Alejandro Tejada wrote:
>
>> Hi Alex,
>>
>> Downloads folder in your server is not accessible.
>>
>> It's not possible to download this stack either:
>> http://tweedly.org/showpage.lc?page=taskRunner
>>
>> Al
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-03 Thread Alex Tweedly
You're right - and I confess I don't know why the downloads folder is 
inaccessible. Permission is set to 755, and there's no .htaccess file or 
anything else I know of to prevent it.


Anyway - if you wanted the taskrunner files, they are :
 - taskrunner.rev
 - taskClientLib.rev
 - test-task-runner.rev
 - verybusy.rev
 - IndexFiles.rev
 - CheckURL.rev

and each one can be downloaded individually, for example

http://tweedly.org/downloads/taskrunner.rev


I guess I'll just have to find a silver lining . this must be a 
security measure to keep files hidden unless I reveal the actual URLs. 
And I will very shortly change the taskRunner page to make the file 
entry line into links that are clickable.


(and btw, although I do still use taskRunner regularly, I haven't 
rebuilt the executables since probably LC 5.0 - so approach with some 
caution :-)


-- Alex.


On 03/12/2016 20:54, Alejandro Tejada wrote:

Hi Alex,

Downloads folder in your server is not accessible.

It's not possible to download this stack either:
http://tweedly.org/showpage.lc?page=taskRunner

Al

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-03 Thread Alex Tweedly
Very strange - the correct URL is 
http://tweedly.org/downloads/checkpermissionsetting.livecode


i.e. without the last 's'

Did you know that, in Chrome, if you modify the URL, and it turns out to 
be a downloadable file - then Chrome downloads it, and then changes the 
visible URL in the address bar back to what it was before !!   So - very 
sorry, the  correct address is indeed


http://tweedly.org/downloads/checkpermissionsetting.livecode (checked 
and downloaded in a new Chrome window :-)


-- Alex.



On 03/12/2016 19:32, Dr. Hawkins wrote:

On Sat, Dec 3, 2016 at 9:47 AM, Alex Tweedly  wrote:


It's at http://tweedly.org/downloads/checkpermissionsettings.livecode



Not Found

The requested URL /downloads/checkpermissionsettings.livecode was not found
on this server.

Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-03 Thread Dr. Hawkins
On Sat, Dec 3, 2016 at 9:47 AM, Alex Tweedly  wrote:

> It's at http://tweedly.org/downloads/checkpermissionsettings.livecode
>


Not Found

The requested URL /downloads/checkpermissionsettings.livecode was not found
on this server.

Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-03 Thread Alex Tweedly
OK, I got slightly lost in this thread - we've gone off to solve a 
work-around to your problem, and I'd like to go back to the problem itself.



If I understood it properly, what you;re seeing is that setting the 
permission of a directory to disallow write *should* prevent you from 
saving a stack within that directory - but it doesn't.


So I decided to write a small test stack that did just that, and see how 
it performs. And it does just what I would expect (which I think is the 
same as you would expect :-)


I know it's unhelpful, even annoying, to be told "it works OK for me" - 
but it works ok for me.


Could I ask you to download my simple stack, and try it out in your 
environment - ideally on the same directory - and report back on what it 
does ? Hopefully this will isolate whether it's your 
OS/filesystem/environment or something else going on in your scrips.


It's at http://tweedly.org/downloads/checkpermissionsettings.livecode

very simple stack - 4 buttons

 - one let's you specify a directory

 - one checks the permission of that directory and write that to the 
msg box


 - one removes write permission on the specified folder

 - the last one adds write permisison.

I actually saved this stack within the folder so I was testing something 
as close as possible to what I thought was your situation.


So you should find that after specifying the folder, you can check the 
permissions, save the stack, remove write permission, check permissions 
(and see that it's gone), then try to save the stack again - and it 
fails. Then add wrote permission back again, chek permissions and then 
save - works OK.


Thanks

-- Alex.



On 02/12/2016 20:34, Dr. Hawkins wrote:

I've added the following after setting the name, and also moved the save
into this block:

*if* (char 1 to 6 of bkNm) <> (char -17 to -12 of the long name of this
stack) *then*

*--date has changed*

bmpVrsn stkNm

*else*

*save* this stack

*end* *if*


bmpVrsn is my routine to bump the filename.  Without this, it would keep
backing up yesterday's file . . .




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Dr. Hawkins
I've added the following after setting the name, and also moved the save
into this block:

*if* (char 1 to 6 of bkNm) <> (char -17 to -12 of the long name of this
stack) *then*

*--date has changed*

bmpVrsn stkNm

*else*

*save* this stack

*end* *if*


bmpVrsn is my routine to bump the filename.  Without this, it would keep
backing up yesterday's file . . .

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Dr. Hawkins
On Fri, Dec 2, 2016 at 12:01 PM, Mike Bonner  wrote:

> Not sure I understand this but... You open a stack, and then try to change
> the permissions of the directory that it resides in so that you then can't
> save it?  Since the file is already open and "in use" i'm not sure its
> actually possible to change the permissions under those circumstances.
>

I've checked; it is.  From within LiveCode, I used a shell command to chmod.

But I've also done it from the OS before launching, and locks the directory
in the OS; these just get ignored (yet saving the preferences for plugins
is not)

 If you create a new folder (empty, or not) and change the permissions on
> that one (with no open stack or file inside) does the change stick?
>

Nope; gets overridden.



-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Mike Bonner
Not sure I understand this but... You open a stack, and then try to change
the permissions of the directory that it resides in so that you then can't
save it?  Since the file is already open and "in use" i'm not sure its
actually possible to change the permissions under those circumstances.
 If you create a new folder (empty, or not) and change the permissions on
that one (with no open stack or file inside) does the change stick?
>>quote
livecode seems to be gratuitously unlocking directories.

I launch live code, and then "chmod -w" the directory of the stack.  On
quit, it restores write permission!

If I use shell (chmod -w someDir), it apparently unlocks it before
returning from shell!

I'm trying to put in a failsafe that prevents overwriting older files.  Do
I need to change the owner of the files for this???


On Fri, Dec 2, 2016 at 12:20 PM, J. Landman Gay 
wrote:

> On 12/2/16 12:55 PM, Dr. Hawkins wrote:
>
>> *--livecode's own stacks*
>>
>> *case* char 1 to 3 of stkNm="Rev"
>>
>> *case* stkNm="Message Box"
>>
>
> This is no longer the case. Some of LC's stacks no longer start with
> "rev". It probably doesn't matter if you back those up anyway, but just so
> you know.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Dr. Hawkins
On Fri, Dec 2, 2016 at 11:20 AM, J. Landman Gay 
wrote:

> On 12/2/16 12:55 PM, Dr. Hawkins wrote:
>
>> *--livecode's own stacks*
>>
>> *case* char 1 to 3 of stkNm="Rev"
>>
>> *case* stkNm="Message Box"
>>
>
> This is no longer the case. Some of LC's stacks no longer start with
> "rev". It probably doesn't matter if you back those up anyway, but just so
> you know.
>

I figure there might be more, but if something causes one to save, it will
just mean that I get an extraneous backup in /tmp . . .


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Dr. Hawkins
On Fri, Dec 2, 2016 at 11:05 AM, Bob Sneidar 
wrote:

> So what *actually* happens when you save a file is, the old file is
> renamed by prepending a tilde (~) to the filename, then an attempt to save
> the file as the original is attempted. If all goes well, the backup copy is
> deleted. So in a sense you are not actually saving, you are saving as.


However, if the directory is write-locked by the OS, both of these
operations should fail . . .


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread J. Landman Gay

On 12/2/16 12:55 PM, Dr. Hawkins wrote:

*--livecode's own stacks*

*case* char 1 to 3 of stkNm="Rev"

*case* stkNm="Message Box"


This is no longer the case. Some of LC's stacks no longer start with 
"rev". It probably doesn't matter if you back those up anyway, but just 
so you know.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Bob Sneidar
So what *actually* happens when you save a file is, the old file is renamed by 
prepending a tilde (~) to the filename, then an attempt to save the file as the 
original is attempted. If all goes well, the backup copy is deleted. So in a 
sense you are not actually saving, you are saving as. 

Someone correct me on this if I am wrong. 

Bob S


> On Dec 2, 2016, at 10:55 , Dr. Hawkins  wrote:
> 
> On Fri, Dec 2, 2016 at 9:59 AM, Rick Harrison 
> wrote:
> 
>> Ok, so it sounds like you are using an LC stack file.
>> You are opening that LC stack from within LC
>> so LC/macOS, (assuming your are on a Macintosh Computer),
>> is going to update the “Date Modified” date because LC/you
>> have touched the file.  That’s built into the OS and is
>> deliberate.
>> 
> 
> Yes, but changing from mode 555 to 755 is not; that's livecode.   . . .

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Dr. Hawkins
On Fri, Dec 2, 2016 at 9:59 AM, Rick Harrison 
wrote:

> Ok, so it sounds like you are using an LC stack file.
> You are opening that LC stack from within LC
> so LC/macOS, (assuming your are on a Macintosh Computer),
> is going to update the “Date Modified” date because LC/you
> have touched the file.  That’s built into the OS and is
> deliberate.
>

Yes, but changing from mode 555 to 755 is not; that's livecode.   . . .

>
> What I do to protect myself from accidental saves is to
> always work with a copy of of the file or folder.  When I get onto
> my computer in the morning.  I first duplicate the stack
> file I want to work with.  I use version numbers which I
> create so I can keep track of which is the current version.
> Sometimes this is as simple as calling it LCStackNameV1
> or LCStackNameV2, V3, etc.  If I’m really want more
> information I might even include the date and/or time
> with that version number:  LCStackName120220161022AMV1
>

Mine are generally stackname.yymmddv.livecode, where v starts at the first
one, and goes on.

But here's a fit of cleverness that seems to work, although it relies on
the OS or user to clean /tmp from time to time:

*on* saveStackRequest

*--keep a copy of the stack*

*local* stkNm, bkNm

*put* the short name of this stack into stkNm

*switch*

*--livecode's own stacks*

*case* char 1 to 3 of stkNm="Rev"

*case* stkNm="Message Box"

*pass* saveStackRequest

*break*

*case* stkNm begins with "dinfo_"

*case* stkNm begins with "dna_"

*case* stkNm begins with "out_"

*--never save these*

*break*

*default*

*--it must be a dh program stack*

*lock* messages

*save* this stack

*put* the seconds into bkNm

*convert* bkNm to dateItems

*put* char 3 to 4 of item 1 of bkNm \

& char -2 to -1 of ("0" & item 2 of bkNm) \

& char -2 to -1 of ("0" & item 3 of bkNm) \

& "." \

& char -2 to -1 of ("0" & item 4 of bkNm) \

& char -2 to -1 of ("0" & item 5 of bkNm) \

into bkNm

*set* the itemDel to "/"

*put* char 1 to -2 of item -1 of the long name of this stack & "." before
bkNm

*put* "cp " & char 8 to -2 of the long name of this stack & " /tmp/" before
bkNm

*unlock* messages

*get* shell(bkNm)

*break*

*end* *switch*

*end* saveStackRequest


So many more than time machine would do, and they go away in a couple of
days if not needed.

I also have a bmpVrsn routine to handle my major checkpoints through the
day (bump the v above)
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Rick Harrison
Ok, so it sounds like you are using an LC stack file.
You are opening that LC stack from within LC
so LC/macOS, (assuming your are on a Macintosh Computer),
is going to update the “Date Modified” date because LC/you
have touched the file.  That’s built into the OS and is
deliberate. 

What I do to protect myself from accidental saves is to
always work with a copy of of the file or folder.  When I get onto
my computer in the morning.  I first duplicate the stack
file I want to work with.  I use version numbers which I
create so I can keep track of which is the current version.
Sometimes this is as simple as calling it LCStackNameV1
or LCStackNameV2, V3, etc.  If I’m really want more
information I might even include the date and/or time
with that version number:  LCStackName120220161022AMV1

If later on in the day, I know that I’ve done a lot of good work/changes
I may make yet another duplicate of the stack and continue with
my version naming convention.

If I did something really really dumb in-between version creations
I can also go back into my TimeMachine backup and pull up a
version of the stack file from it’s last hourly backup, so I can
eliminate as much of my working loss as possible.

We live in the age of giant hard drives.  I can duplicate my folders
the same way if I need to.  When I’m all done with a project, and it
has been finalized, then I can go back and delete all of those
old files/folders if I want to.

That’s how I protect myself from my own stupid saving mistakes.

I hope that helps. :-)

Rick






> On Dec 2, 2016, at 10:26 AM, Dr. Hawkins  wrote:
> 
> On Thu, Dec 1, 2016 at 4:08 PM, Rick Harrison 
> wrote:
> 
>> If you just want to prevent overwriting of older files,
>> why don’t you just use a new name for the file.
>> 
> 
> This is about protecting me from accidental saves.
> 
> There are a dozen or so separate files.  I want a new "main" stack for
> every editing day, but most of the others don't usually get changed.
> 
> So blocking the directory when a date change is detected neatly solves the
> problem--but livecode apparently overrides this.
> 
>> Still if LC is not doing what it is supposed to, or doing something
>> that it shouldn’t do, it should be fixed.
> 
> if something is locked in the OS livecode should not be unlocking it.
> 
> I suppose I can trap saveStackRequest, but I shouldn't have to for this.
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: live code seems to gratuitously unlock write permission for directories

2016-12-02 Thread Dr. Hawkins
On Thu, Dec 1, 2016 at 4:08 PM, Rick Harrison 
wrote:

> If you just want to prevent overwriting of older files,
> why don’t you just use a new name for the file.
>

This is about protecting me from accidental saves.

There are a dozen or so separate files.  I want a new "main" stack for
every editing day, but most of the others don't usually get changed.

So blocking the directory when a date change is detected neatly solves the
problem--but livecode apparently overrides this.

>Still if LC is not doing what it is supposed to, or doing something
>that it shouldn’t do, it should be fixed.

if something is locked in the OS livecode should not be unlocking it.

I suppose I can trap saveStackRequest, but I shouldn't have to for this.

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: live code seems to gratuitously unlock write permission for directories

2016-12-01 Thread Rick Harrison
Hi Dr. Hawkins,

If you just want to prevent overwriting of older files, 
why don’t you just use a new name for the file.  
You can always track which file is the newest in a few
different ways.

For Example:  File1, File2, or append a date and time to the file name.
At the end of some larger time period you can decide which ones
to keep and which to toss out.  You don’t have to screw around
with file permissions at all then.  

You can always check for the existence of a file too by name. 
If the file already exists then you know not to rewrite it.  
Create a new name for a new file and use that one instead.

Still if LC is not doing what it is supposed to, or doing something
that it shouldn’t do, it should be fixed.

Good luck,

Rick

> On Dec 1, 2016, at 2:53 PM, Dr. Hawkins  wrote:
> 
> On Thu, Dec 1, 2016 at 11:32 AM, Dr. Hawkins  wrote:
> 
>> I'm trying to put in a failsafe that prevents overwriting older files.  Do
>> I need to change the owner of the files for this???
>> 
> 
> That doesn't do it either:
> 
> get shell ("chmod -w " & oldFlDir && "; chown dhArchive " & oldFlDir)
> 
> 
> gets
> 
> chown: /Users/hawk/Documents/dhbk/16/1611/161130: Operation not permitted
> 
> And I still own the directory, and it's still write-enabled.
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: live code seems to gratuitously unlock write permission for directories

2016-12-01 Thread Dr. Hawkins
On Thu, Dec 1, 2016 at 11:32 AM, Dr. Hawkins  wrote:

> I'm trying to put in a failsafe that prevents overwriting older files.  Do
> I need to change the owner of the files for this???
>

That doesn't do it either:

get shell ("chmod -w " & oldFlDir && "; chown dhArchive " & oldFlDir)


gets

chown: /Users/hawk/Documents/dhbk/16/1611/161130: Operation not permitted

And I still own the directory, and it's still write-enabled.

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode