From: Stefano Antonelli
Subject: changing file access rights from a clisp function
Date: 
Message-ID: <34424E2C.7015@cs.city.ac.uk>
I'm using Solaris for pc operative system, with the following shareware
version of clisp:

  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo   
  I I I I I I I      8     8   8           8     8     o  8    8  
  I I I I I I I      8         8           8     8        8    8  
  I I I I I I I      8         8           8      ooooo   8oooo   
  I  \ `+' /  I      8         8           8           8  8       
   \  `-+-'  /       8     o   8           8     o     8  8       
    `-__|__-'         ooooo    8oooooo  ooo8ooo   ooooo   8       
        |                                                         
  ------+------     Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
                    Copyright (c) Bruno Haible, Marcus Daniels 1994-1997

This should be a standard version, without the possibility to include c
code and machine dependent stuff.
Have you got any idea on how to change the write access right of a file
from a lisp function?
This is the current mask the "with-open-file" function provides me every
time I create a file:

-rw-r--r--   1 antonel  9555         602 Oct 13 16:56 events.bus

I'd need something like
-rw-rw-rw-

The file is created every time I run the function, so is useless to
change the access mask from a shell.

Thank you for your attention

Stefano
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Stefano Antonelli           
  ··············@cs.city.ac.uk                        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  City University, Northampton Sq, London EC1V0HB
  Dept. of Computer Science, Room A534    
  Phone: +44 171 477 8000, ask for x3408 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Bruno Haible
Subject: Re: changing file access rights from a clisp function
Date: 
Message-ID: <625ov6$fdn$1@nz12.rz.uni-karlsruhe.de>
Stefano Antonelli <·······@cs.city.ac.uk> wrote:
> ... the following shareware version of clisp:

Please note that clisp is freeware, not shareware, and GPL'ed.

> This is the current mask the "with-open-file" function provides me every
> time I create a file:
>
> -rw-r--r--   1 antonel  9555         602 Oct 13 16:56 events.bus
>
> I'd need something like
> -rw-rw-rw-

Since the access permissions of a file are not a notion portable across
different operating systems, clisp does not offer an option for
modifying them. All you can do is to call a shell command:

    (shell "chmod a+w events.bus")

or, if you are running Linux clisp with the Linux bindings loaded,

    (linux:chmod "events.bus" #x664)


                   Bruno