Ralph Lange wrote:
>
> Hi Marty,
>
> > At the end of our vwXorks startup files we execute the command:
> >
> > dbl > some_file
> >
> > If the file is written via ftp it has the protections:
> >
> > -rw-r--r--
> >
> > I it is written via NFS it is
> >
> > -rw-r-----
> >
> > Does anyone know how we can make the NFS create the file with:
> >
> > -rw-r--r--
>
> I proposed this question to my favourite WRS support engineer and the
> official answer is:
>
> [ If you supply a "mode" in the open() call, it will be the file mode -
> [ default permissions otherwise.
> [
> [ nfsLib.c :
> [
> [ createArgs.where.name = fileName;
> [
> [ pSattr = &createArgs.attributes;
> [
> [ if (mode == 0)
> [ /* create a file with default permissions */
> [ pSattr->mode = NFS_FSTAT_REG | DEFAULT_FILE_PERM;
> [ else
> [ pSattr->mode = mode;
>
> Ralph
In our vxWorks distribution I did a grep for DEFAULT_FILE_PERM
and sure enough I found
h/ioLib.h:#define DEFAULT_FILE_PERM 0000640
Changing the value to 644 should solve the problem
By the way I did change dbl so it accepts an optional 2nd argument
which is a file name. dbl then executes
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644 );
This solved the problem for dbl.
Ralph's solution solves the problem for all commands of the form
xxx > "file name"
Thanks,
Marty
- Replies:
- Re: NFS vxWorks UMASK Ralph Lange
- References:
- Re: NFS vxWorks UMASK Ralph Lange
- Navigate by Date:
- Prev:
MAC4 with EPICS? Thomas Hahn
- Next:
Re: posting archive monitors on dbPut() Marty Kraimer
- Index:
1994
1995
1996
<1997>
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: NFS vxWorks UMASK Ralph Lange
- Next:
Re: NFS vxWorks UMASK Ralph Lange
- Index:
1994
1995
1996
<1997>
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|